/** * @param userId The identity of the person or process manipulating the data. If both are known, then two active * participants shall be included (both the person and the process). * @param altUserId Alternate UserID * @param userName UserName * @param networkAccessPointId Network Access Point ID * @param roleIds Role ids * @param userIsRequestor A single user (either local or remote) shall be identified as the requestor, i.e., * UserIsRequestor with a value of TRUE. This accommodates both push and pull transfer models for media * @return this */ public PatientRecordBuilder addUserParticipant(String userId, String altUserId, String userName, String networkAccessPointId, List<ActiveParticipantRoleId> roleIds, boolean userIsRequestor) { return addActiveParticipant(userId, altUserId, userName, userIsRequestor, roleIds, networkAccessPointId); }
public PatientRecordBuilder addPatient(String patientId, String patientName, List<TypeValuePairType> details, ParticipantObjectDataLifeCycle lifeCycle) { return addPatientParticipantObject(patientId, patientName, details, lifeCycle); }
public PatientRecordBuilder(EventOutcomeIndicator outcome, String eventOutcomeDescription, EventActionCode action, EventType eventType, PurposeOfUse... purposesOfUse) { super(); setEventIdentification(outcome, eventOutcomeDescription, action, EventIdCode.PatientRecord, eventType, purposesOfUse ); }
/** * 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(); }
IHEPatientRecordChangeLinkBuilder(AuditContext auditContext, AuditDataset auditDataset) { super(auditContext, new PatientRecordBuilder(auditDataset.getEventOutcomeIndicator(), EventActionCode.Update, MllpEventTypeCode.XadPidLinkChange)); // First the source, then the destination if (auditDataset.isServerSide()) { setRemoteParticipant(auditDataset); addHumanRequestor(auditDataset); setLocalParticipant(auditDataset); } else { setLocalParticipant(auditDataset); addHumanRequestor(auditDataset); setRemoteParticipant(auditDataset); } }
@Override public void validate() { super.validate(); int aps = getMessage().getActiveParticipants().size(); if (aps < 1 || aps > 2) { throw new AuditException("Must have one or two user ActiveParticipants"); } if (getMessage().findParticipantObjectIdentifications(poi -> poi.getParticipantObjectIDTypeCode() == ParticipantObjectIdTypeCode.PatientNumber).size() != 1) { throw new AuditException("Must one ParticipantObjectIdentification with ParticipantObjectIDTypeCode PatientNumber"); } } }
public IHEPatientRecordChangeLinkBuilder setSubmissionSet(Iti64AuditDataset auditDataset) { String submissionSetUuid = auditDataset.getSubmissionSetUuid() != null ? auditDataset.getSubmissionSetUuid() : getAuditContext().getAuditValueIfMissing(); if (auditDataset.getSubmissionSetUuid() != null) { delegate.addParticipantObjectIdentification( ParticipantObjectIdTypeCode.XdsMetadata, null, null, Collections.emptyList(), submissionSetUuid, ParticipantObjectTypeCode.System, ParticipantObjectTypeCodeRole.Job, null, null); } return this; }
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 PatientRecordEventBuilder(AuditContext auditContext, AuditDataset auditDataset, EventOutcomeIndicator eventOutcomeIndicator, String eventOutcomeDescription, EventActionCode action, EventType eventType, PurposeOfUse... purposesOfUse) { super(auditContext, new PatientRecordBuilder( eventOutcomeIndicator, eventOutcomeDescription, action, eventType, purposesOfUse)); // First the source, then the destination if (auditDataset.isServerSide()) { setRemoteParticipant(auditDataset); addHumanRequestor(auditDataset); setLocalParticipant(auditDataset); } else { setLocalParticipant(auditDataset); addHumanRequestor(auditDataset); setRemoteParticipant(auditDataset); } }
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 PatientRecordBuilder addPatient(String patientId, String patientName, List<TypeValuePairType> details) { return addPatientParticipantObject(patientId, patientName, details, null); }
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; }