-
Notifications
You must be signed in to change notification settings - Fork 80
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
base: main
Are you sure you want to change the base?
Conversation
...ava/org/openmrs/module/initializer/api/fhir/ocm/FhirObservationCategoryMapLineProcessor.java
Show resolved
Hide resolved
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(); | ||
} |
There was a problem hiding this comment.
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.
8e457f3
to
795789d
Compare
There was a problem hiding this 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?
So, FHIR Observations have a 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to move the actual logic into the FHIR2 module, so this remains pending. |
See this comment for details about this PR's rationale.