Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Fields From FHIR Bundle #982

Merged
merged 100 commits into from
Apr 5, 2024
Merged

Extract Fields From FHIR Bundle #982

merged 100 commits into from
Apr 5, 2024

Conversation

jorg3lopez
Copy link
Contributor

@jorg3lopez jorg3lopez commented Mar 27, 2024

Extract Fields From FHIR Bundle

This PR adds the logic to extract the following fields from the FHIR bundle:

  • placer order number
  • sending application id
  • sending facility id
  • receiving application id
  • receiving facility id

These fields are extracted from orders and results.

Issue

#621

Checklist

  • I have added tests to cover my changes
  • I have added logging where useful (with appropriate log level)
  • I have added JavaDocs where required
  • I have updated the documentation accordingly

@jorg3lopez jorg3lopez marked this pull request as draft March 27, 2024 22:02
@halprin
Copy link
Member

halprin commented Mar 28, 2024

I talked with the HL7 SMEs. They stated that the MSH fields' most important sub-fields are the first two, and the ORC field's most important sub-fields are the first three. This basically means that we shouldn't just return a single ID for each of these new methods we're adding. Honestly, we might as well include all of the sub-fields.

We should either add additional methods for each sub-field, have the existing method return all the important sub-fields with some delimiter (e.g. 1234^other_stuff^moof using ^ as the delimiter), have the existing method return a POJO (Plain Old Java Object) that has the sub-fields, or some other solution that I'm not thinking of.

@jorg3lopez
Copy link
Contributor Author

I talked with the HL7 SMEs. They stated that the MSH fields' most important sub-fields are the first two, and the ORC field's most important sub-fields are the first three. This basically means that we shouldn't just return a single ID for each of these new methods we're adding. Honestly, we might as well include all of the sub-fields.

We should either add additional methods for each sub-field, have the existing method return all the important sub-fields with some delimiter (e.g. 1234^other_stuff^moof using ^ as the delimiter), have the existing method return a POJO (Plain Old Java Object) that has the sub-fields, or some other solution that I'm not thinking of.

Yes. I noticed that we would have to get more than a sub-field. I'm taking the namespace-id, universal-id, and universal-type-id for the most part. I already have a method that concatenates and joins the fields with a caret. I still haven't looked into isolating each id for later use. Right now, I'm only spitting out something like: Epic^1.2.840.114350.1.13.145.2.7.2.695071^ISO

@jorg3lopez jorg3lopez marked this pull request as ready for review April 5, 2024 10:23
Copy link
Contributor

@basiliskus basiliskus left a comment

Choose a reason for hiding this comment

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

Great job on this PR! I just left a few minor comments

Copy link

sonarqubecloud bot commented Apr 5, 2024

Copy link
Contributor

@basiliskus basiliskus left a comment

Choose a reason for hiding this comment

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

Great work!


@Override
public String getFhirResourceId() {
return innerResource.getIdElement().getIdPart();
Copy link
Contributor Author

@jorg3lopez jorg3lopez Apr 5, 2024

Choose a reason for hiding this comment

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

@luis-pabon-tf Any idea why it shows that this method is not covered by the tests in HapiOrderTest and HapiResultTest?

Copy link
Contributor

Choose a reason for hiding this comment

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

I merged this before seeing this was commented. Let's keep track of test coverage for this and make another PR to fix it if necessary.

@saquino0827 saquino0827 merged commit 9dfbe9d into main Apr 5, 2024
15 checks passed
@saquino0827 saquino0827 deleted the story/621/extract-ids branch April 5, 2024 21:35
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.

6 participants