Skip to content

Conversation

@skeating
Copy link
Contributor

@skeating skeating commented Aug 10, 2025

Addresses #103

skeating and others added 6 commits August 10, 2025 14:17
Adds functionality to extract and utilize the admission type
information from the PV1 segment of HL7 messages. This includes
defining a getter method and adding a unit test to verify the correct
extraction of the admission type value..
case "A01":
AdmitPatient admitPatient = new AdmitPatient();
admitPatient.setAdmissionDateTime(InterchangeValue.buildFromHl7(pv1Wrap.getAdmissionDateTime()));
admitPatient.setAdmissionType(InterchangeValue.buildFromHl7(pv1Wrap.getAdmissionType()));
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if we need to do this for all message types.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah good question, if we only do it here then should remove from the generic ADT message.

Copy link
Collaborator

@stefpiatek stefpiatek left a comment

Choose a reason for hiding this comment

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

Looking good, will also need changes in emap core and the database to then save this information

private InterchangeValue<String> patientTitle = InterchangeValue.unknown();
private InterchangeValue<String> patientZipOrPostalCode = InterchangeValue.unknown();

private InterchangeValue<String> admissionType = InterchangeValue.unknown();
Copy link
Collaborator

Choose a reason for hiding this comment

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

if the intention is to only have this in an admission message then we should remove it from here (or if its for all ADT, then we should remove it from AdmitPatient).

case "A01":
AdmitPatient admitPatient = new AdmitPatient();
admitPatient.setAdmissionDateTime(InterchangeValue.buildFromHl7(pv1Wrap.getAdmissionDateTime()));
admitPatient.setAdmissionType(InterchangeValue.buildFromHl7(pv1Wrap.getAdmissionType()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah good question, if we only do it here then should remove from the generic ADT message.

@thompson318
Copy link
Contributor

PR checklist

Default guide for a PR (if multiple PRs for the work, only keep one version of it and link to it on the other PRs)

  • From the UCLH data science desktop, a validation run has been set off
  • Check that content that reveals Epic IP (eg. Clarity/Caboodle queries) has not been checked into a public repo.
  • load times
    in UCL teams has been populated with the run information
  • During the run, glowroot has been checked for any queries which are taking a substantial proportion of the
    total processing time. This can be useful to identify indexes that are required.
  • After the run, look for any unexpected errors in the etl_per_message_logging table, the error_search.sql file
    on the shared drive can be used for this \\sharefs6\UCLH6\EMAP\Shared\EmapSqlScripts\devops\error_search.sql.
    Create an issue if you find an unexpected exception and is not related to the changes you've made, otherwise
    fix them!
  • After the run, populate the end time in
    load times
  • Let Aasiyah know about the completed validation and give her information on the changes and where to start
    with the validation
  • Check validation report and give any feedback to Aasiyah if there are any changes needed on her side,
    iterate on getting the validation to match at least 99% (validation and emap code).

@thompson318
Copy link
Contributor

thompson318 commented Sep 25, 2025

running error_search.sql results in 15 errors (all the same)
could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement uk.ac.ucl.rits.inform.interchange.lab.LabOrderMsg

I ran the query on star_b to get a baseline, and observed the same error message there, so will raise a separate issue. #117

@stefpiatek
Copy link
Collaborator

Yeah as long as we're not introducing a new error with that change then that's fine.

@thompson318 thompson318 marked this pull request as ready for review October 6, 2025 14:21
@skeating
Copy link
Contributor Author

NOTE THIS HAS BEEN MERGED INTO test_branch_zella

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.

4 participants