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

Fix FHIR Conversion for Specimen in Lab Info #2858

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

angelathe
Copy link
Collaborator

@angelathe angelathe commented Nov 4, 2024

PULL REQUEST

Summary

  • Fix FHIR conversion for Specimen (Source) in the Lab Info section

Related Issue

Fixes #2724

Acceptance Criteria

  • When a lab specimen (source) information is available, it should be displayed under the Specimen (Source) row for the Lab Result.

Screenshot: 6a6bcd7d-7bad-48f6-9e0b-39a4ec9e063e

Before:
image

After:
Screenshot 2024-11-04 at 07 15 11

Checklist

Example eCRs from QA process:

@angelathe angelathe self-assigned this Nov 4, 2024
@angelathe angelathe force-pushed the angela/2724-bug-lab-specimen branch from 143e80f to 7ec6bc2 Compare November 4, 2024 15:39
@angelathe angelathe marked this pull request as ready for review November 4, 2024 15:50
Copy link
Collaborator

@JNygaard-Skylight JNygaard-Skylight left a comment

Choose a reason for hiding this comment

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

Would it be possible to add or update a fhir-converter test for this?

@angelathe
Copy link
Collaborator Author

Would it be possible to add or update a fhir-converter test for this?

@JNygaard-Skylight TY! Just added.

@@ -45,11 +45,15 @@
{% endif -%}
{% elsif comp.procedure.participant.participantRole.id.displayName -%}
{% assign specValue = comp.procedure.participant.participantRole.id.displayName -%}
{% elsif entry.organizer.component.procedure.participant.participantRole.playingEntity.code.displayName -%}
{% assign specValue = comp.procedure.participant.participantRole.playingEntity.code.displayName -%}
{% elsif comp.procedure.participant.participantRole.playingEntity.code.originalText._ %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it be worth pulling out comp.procedure.participant.participantRole.playingEntity after line 41 or so? it might improve readability in this case

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mcmcgrath13 TY, just fixed!

{% elsif comp.procedure.participant.participantRole.playingEntity.code.originalText._ %}
{% assign specValue = comp.procedure.participant.participantRole.playingEntity.code.originalText._ -%}
{% elsif comp.procedure.participant.participantRole.playingEntity.code.displayName -%}
{% assign specValue = comp.procedure.participant.participantRole.playingEntity.code.displayName -%}
Copy link
Collaborator

Choose a reason for hiding this comment

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

this isn't a pattern I'v come across before - am I understanding correctly that this specValue is kind of "attached" to to the component and then available for use elsewhere? (basically mutating it vs just computing and using locally?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not attached to the component, but specValue is accessible within the template it's created in, even across include statements. So now it's made available across _entry -> _entry_organizer_component -> Resource/_Observation`, where it finally gets used.

Copy link
Collaborator

@mcmcgrath13 mcmcgrath13 left a comment

Choose a reason for hiding this comment

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

thanks!

@angelathe angelathe added this pull request to the merge queue Nov 5, 2024
Merged via the queue into main with commit 198d6a2 Nov 5, 2024
32 checks passed
@angelathe angelathe deleted the angela/2724-bug-lab-specimen branch November 5, 2024 15:00
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.

BUG: Fix FHIR conversion for Specimen (Source) in Lab Info
3 participants