Skip to content

Conversation

@mohan-13
Copy link
Member

This PR adds the mandatory mappings that are required by DCM4CHEE 5 to receive and process HL7 ORM Messages and convert them to DICOM MWL.

Following are the changes:

Message Header

  1. Added Sending Applicaton --> Can be overriden by setting environment varibale HL7_SENDING_APPLICATION
  2. Added Sending Facility --> Can be overriden by setting environement variable HL7_SENDING_FACILITY. This will show as Institution Name in DICOM MWL
  3. Added Receiving Applicaton --> Can be overriden by setting environment varibale HL7_RECEIVING_APPLICATION
  4. Added Receving Facility --> Can be overriden by setting environement variable HL7_RECEIVING_FACILITY. This will show as Institution Name in DICOM MWL

Patient Demographics

  1. Set Identifier type code as MR. Can be overriden by HL7_PATIENT_IDENTIFIR_TYPE_CODE
  2. Added assigning authority for identifier
  3. Set names in correct fields

ORC

Adds custom ZDS block to generate and set StudyInstanceUID.

OBR

Adds Placer Field 1 with Order Number. Shows as Accession Number in DCM4CHEE

This change is backward compatiblw with dcm4chee 2.x also, since these mappings are part of orm2dcm.xsl which is not needed for now

DCM4CHEE 2.5.x

Screenshot 2025-11-27 at 12 06 22 AM

DCM4CHEE 5.33.1

Screenshot 2025-11-27 at 12 07 35 AM|

@mohan-13 mohan-13 requested a review from angshu November 27, 2025 01:44
pid.getAdministrativeSex().setValue(openMRSPatient.getGender());

message.getORDER().getORDER_DETAIL().getOBR().getPlannedPatientTransportComment(0).getText().setValue(openMRSPatient.getGivenName()+","+openMRSPatient.getFamilyName());
message.getORDER().getORDER_DETAIL().getOBR().getPlannedPatientTransportComment(0).getText().setValue(openMRSPatient.getGivenName() + "," + openMRSPatient.getFamilyName());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one improvement we can do (maybe later, is to localize the name. eg family, given

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Will note it down on a card

@Component
public class StudyInstanceUIDGeneratorImpl implements StudyInstanceUIDGenerator {

@Value("${study.instance.uid.prefix:1.2.826.0.1.3680043.8.498}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no additional miliseconds part? is it always fixed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the base UID specific to the org. We will be appending hash code of order number

}

@Test
public void shouldGenerateStudyInstanceUIDWithPrefixandOrderNumberHash() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To assert that for a given order number (ORD-317), the same studyinstanceid is generated - writing another test case would be nice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mohan-13 mohan-13 merged commit 0e948ee into master Nov 27, 2025
2 checks passed
@mohan-13 mohan-13 deleted the BAH-4301 branch November 27, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants