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

Add domain for FHIR ObservationCategoryMaps #201

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ibacher
Copy link
Member

@ibacher ibacher commented Sep 29, 2022

See this comment for details about this PR's rationale.

Comment on lines 47 to 58
if (fhirObsCategory != null && !fhirObsCategory.isEmpty() && conceptClass != null && !conceptClass.isEmpty()) {
result = (FhirObservationCategoryMap) sessionFactory.getCurrentSession()
.createQuery("from " + FhirObservationCategoryMap.class.getSimpleName()
+ " where observationCategory = :fhirObsCategory and conceptClass = (" + "select cc from "
+ ConceptClass.class.getSimpleName() + " cc where cc.name = :conceptClassName" + ")")
.setParameter("fhirObsCategory", fhirObsCategory).setParameter("conceptClassName", conceptClass)
.uniqueResult();
}

if (result == null && line.getUuid() != null && !line.getUuid().isEmpty()) {
result = (FhirObservationCategoryMap) sessionFactory.getCurrentSession()
.createQuery("from " + FhirObservationCategoryMap.class.getSimpleName() + " where uuid = :uuid")
.setParameter("uuid", line.getUuid()).uniqueResult();
}
Copy link
Member

Choose a reason for hiding this comment

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

@ibacher, I'd have this logic decoupled from iniz, so having it in the fhir2 dao/service would be fairly neater if there is no limitation for this.

@ibacher ibacher force-pushed the fhir-obs-category-maps branch from 8e457f3 to 795789d Compare February 24, 2023 17:24
Copy link
Member

@mks-d mks-d left a comment

Choose a reason for hiding this comment

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

@mherman22 could you provide a detailed description to this PR so as to provide more context? Or @ibacher could you speak to it?

@ibacher
Copy link
Member Author

ibacher commented Jun 28, 2024

So, FHIR Observations have a category property that tries to cover "what kind" of observation that they are. In OMRS, the same concept is usually represented by "concept class" for the concept associated with the observation. This provides a way of mapping between the FHIR category field and the concept's concept class because, wherever possible, we want to use the standard FHIR value set, but OMRS's ConceptClasses don't necessarily always align with those categories.

Basically, we use this field to power the "lab results viewer" and could use it for other things, like vital signs, but we need a way of allowing custom mappings to accommodate this flexibly.

Copy link
Member

@mks-d mks-d left a comment

Choose a reason for hiding this comment

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

LGTM, two things:

  1. @ibacher could you address the conflict reported?
  2. @Ruhanga could you confirm that your requested change has been addressed by validating this PR?

@ibacher
Copy link
Member Author

ibacher commented Jul 1, 2024

I still need to move the actual logic into the FHIR2 module, so this remains pending.

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