-
Notifications
You must be signed in to change notification settings - Fork 16
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
Parse CDA section by code in addition to templateId #66
Comments
Hey Can you assign me this issue ? Will start working on it right away! |
👋 @Vortex-21 - assigned you the issue, any questions let me know! |
@Vortex-21 just checking if you still want to work on this issue! I will unassign you but please still feel free to work on it if you want - we've just decided to to change the issue assignment system. |
Yes I would still want to work on this issue ! |
Here in this component , is the code "51847-2" supposed to be the LOINC code for the NOTE enum ? I could get the exact medication, problem and allergy codes but I am not so sure about the "note" code. Asking this because the section_id does contain NOTE :
Apart from this I have made the necessary changes and tested on the uclh_cd.xml document as well as the already existing tests . Everything is working as expected and is ready for a PR . |
@Vortex-21 Yes you can assume that's the code for the note section for now! |
Yes . Raised the PR using that code only ! |
Description
CDA (Clinical Document Architecture) is an XML-based standard for encoding clinical documents, designed to facilitate interoperable exchange of medical information between healthcare systems.
Currently, the CDA parser parses problems, medications, and allergies sections, using a dictionary-based internal representation via
xmltodict
. It finds sections by parsing and checking thetemplateId
field instructuredBody/Component/Section
(Reference). However as it is not a required field, sections are sometimes not picked up. To make sure sections are picked up, we should check thecode
field as well.Example
This will parse as a medication section because it contains
templateId
:HealthChain/resources/uclh_cda.xml
Lines 1506 to 1512 in a4beb13
This will not be parsed as a medication section because it doesn't contain
templateId
. The identifier is in thecode
field instead:HealthChain/resources/epic_cda.xml
Lines 248 to 250 in a4beb13
Context
CDAs from different regions and providers can be implemented very differently. This is part of a larger effort to make the CDA parser more configurable and adaptable.
Possible Implementation
SectionCode
enum._find_section_by_code()
inCdaAnnotator
_find_problems_section()
,_find_medications_section()
, and_find_allergies_section()
Alternative Implementation
We can also make the
templateId
andcode
configurable - currently hard-coded.The text was updated successfully, but these errors were encountered: