/** * Adds each patient ID as ParticipantObject in the context of a single request * * @param requestIdDesignator request or message ID designator, e.g. MSH-10 for HL7v2 and II for HL7v3 * @param requestId ID of the request or message * @param patientIds IDs of the patient * @return this */ public T addPatients(String requestIdDesignator, String requestId, String... patientIds) { if (patientIds != null) Arrays.stream(patientIds) .filter(Objects::nonNull) .forEach(patientId -> delegate.addPatient(patientId, null, requestIdDesignator != null && requestId != null ? Collections.singletonList(getTypeValuePair(requestIdDesignator, requestId)) : Collections.emptyList())); return self(); }
public IHEPatientRecordChangeLinkBuilder setSubsumedLocalPatientId(Iti64AuditDataset auditDataset) { String patientId = auditDataset.getSubsumedLocalPatientId() != null ? auditDataset.getSubsumedLocalPatientId() : getAuditContext().getAuditValueIfMissing(); delegate.addPatient(patientId, null, Arrays.asList( getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()), getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "subsumedPatientId") ), LogicalDeletion); return this; }
public IHEPatientRecordChangeLinkBuilder setNewPatientId(Iti64AuditDataset auditDataset) { String patientId = auditDataset.getNewPatientId() != null ? auditDataset.getNewPatientId() : getAuditContext().getAuditValueIfMissing(); delegate.addPatient(patientId, null, Arrays.asList( getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()), getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "newPatientId") ), // If newPatientId and previousPatientId are not equal, then this // value shall equal "14" (Logical deletion). Otherwise, this value // is not specialized. Objects.equals(auditDataset.getNewPatientId(), auditDataset.getPreviousPatientId()) ? null : Origination); return this; }
public IHEPatientRecordChangeLinkBuilder setPreviousPatientId(Iti64AuditDataset auditDataset) { String patientId = auditDataset.getPreviousPatientId() != null ? auditDataset.getPreviousPatientId() : getAuditContext().getAuditValueIfMissing(); delegate.addPatient(patientId, null, Arrays.asList( getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()), getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "previousPatientId") ), // If newPatientId and previousPatientId are not equal, then this // value shall equal "14" (Logical deletion). Otherwise, this value // is not specialized. Objects.equals(auditDataset.getNewPatientId(), auditDataset.getPreviousPatientId()) ? null : LogicalDeletion); return this; }
public IHEPatientRecordChangeLinkBuilder setLocalPatientId(Iti64AuditDataset auditDataset) { String patientId = auditDataset.getLocalPatientId() != null ? auditDataset.getLocalPatientId() : getAuditContext().getAuditValueIfMissing(); delegate.addPatient(patientId, null, Arrays.asList( getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()), getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "localPatientId") ), // If subsumedLocalPatientId is present, then this value shall // equal "1" (Origination / Creation). Otherwise, this value is not // specialized. auditDataset.getSubsumedLocalPatientId() == null ? null : Origination); return this; }