shujaat
shujaat

Reputation: 389

relationship between section and entry in CDA documents

My question is if the entry/clinical statement in CDA document is identifiable by the parent section. I have come across a situation where I need to identify which entry belongs to the section. For example the section below

<section>
                    <!-- conforms to Vital Signs section with entries optional -->
                    <templateId root="2.16.840.1.113883.10.20.22.2.4"/>
                    <!-- Vital Signs section with entries required -->
                    <templateId root="2.16.840.1.113883.10.20.22.2.4.1"/>
                    <code code="8716-3" codeSystem="2.16.840.1.113883.6.1"
                        codeSystemName="LOINC" displayName="Vital Signs"/>

Is this section related to which of the first entry or the second entry below?

First entry

<entry typeCode="DRIV">
                                <organizer classCode="CLUSTER" moodCode="EVN">
                                    <!-- ** Vital signs organizer ** -->
                                    <templateId root="2.16.840.1.113883.10.20.22.4.26"/>
                                    <id root="c6f88320-67ad-11db-bd13-0800200c9a66"/>
                                    <code xsi:type="CD" code="46680005" codeSystem="2.16.840.1.113883.6.96"
                                    codeSystemName="SNOMED-CT" displayName="Vital signs"/>

Second entry

<entry typeCode="DRIV">
                            <procedure classCode="ACT" moodCode="EVN">
                                <!-- Procedure Activity Act Template -->
                                <templateId root="2.16.840.1.113883.10.20.22.4.12"/>
                                <id root="e401f340-7be2-11db-9fe1-0800200c9a66"/>
                                <code xsi:type="CE" code="97802" codeSystem="2.16.840.1.113883.6.12"
                                    displayName="Medical nutrition, indiv, in"
                                    codeSystemName="CPT">

Clearly the first entry is related to the section if you go through the contents as both are related to vital signs. This is a manual process. Is there any rule in the CDA schema that makes it crystal clear so that it can be implemented/identified in an automated way generally as a program?

Upvotes: 1

Views: 386

Answers (2)

veritas
veritas

Reputation: 432

TLDR;

IF you go to this site, it shows you all the mappings of tempalte root ID

https://build.fhir.org/ig/HL7/CDA-ccda-2.2/toc.html

If you add the template root id in the ofical docs, it will tell you what category it belongs to. E.g I copied template root ID from your second entry 2.16.840.1.113883.10.20.22.4.12 and placed it in this site

https://build.fhir.org/ig/HL7/CDA-ccda-2.2/StructureDefinition-2.16.840.1.113883.10.20.22.4.12.html

This is the page it shows Resource Profile: Procedure Activity Act

Similarly, if I do the below for the first root template id, it gives me the official page for vital signs

https://build.fhir.org/ig/HL7/CDA-ccda-2.2/StructureDefinition-2.16.840.1.113883.10.20.22.2.4.html

What you need to do is to make a Constant file of all root templateIDs so that you can then parse sections according to the template root ID e.g

public class CCDConstants {

    public static final String[] CCD_VITAL_SIGN_SECTION_ID={"2.16.840.1.113883.10.20.22.2.4","2.16.840.1.113883.10.20.22.2.4.1","2.16.840.1.113883.10.20.1.16","1.3.6.1.4.1.19376.1.5.3.1.3.25"};
    public static final String[] CCD_PROBLEM_SECTION_ID= {"2.16.840.1.113883.10.20.22.2.5.1","2.16.840.1.113883.10.20.1.11","2.16.840.1.113883.3.88.11.83.103","1.3.6.1.4.1.19376.1.5.3.1.3.6"};
    public static final String[] CCD_MEDICATION_SECTION_ID={"2.16.840.1.113883.10.20.22.2.1.1","2.16.840.1.113883.10.20.22.2.38","1.3.6.1.4.1.19376.1.5.3.1.3.19","2.16.840.1.113883.3.88.11.83.112","2.16.840.1.113883.10.20.1.8"};
    public static final String[] CCD_ALLERGIES_SECTION_ID={"2.16.840.1.113883.10.20.22.2.6.1","1.3.6.1.4.1.19376.1.5.3.1.3.13","2.16.840.1.113883.3.88.11.83.102","2.16.840.1.113883.10.20.1.2"};
    public static final String[] CCD_PLAN_OF_CARE_SECTION={"2.16.840.1.113883.10.20.22.2.10"};
    public static final String[] CCD_SOCIAL_HISTORY_SECTION={"2.16.840.1.113883.10.20.22.2.17"};
    public static final String[] ASSESSMENT_PLAN_SECTION={"2.16.840.1.113883.10.20.22.2.9"};
    public static final String[] PAST_ENCOUNTER_SECTION={"2.16.840.1.113883.10.20.22.2.22"};
    
    }

Then you can do something like

Section section =     CommonUtil.findSectionById(continuityOfCareDocument.getAllSections(),
                        CCDConstants.PAST_ENCOUNTER_SECTION, false);

In the code above, the openhealth library has already parsed all sections and placed them in a java class. Now you're just taking the ENCOUNTER section (e.g) and then doing someting with it.

For more info, check out this library This is a java based library but I wanted to give you an idea how it is done.

Upvotes: 0

Andrew
Andrew

Reputation: 21

The entries that belong to the section should be enclosed in between the two section tags. So for the Vital Signs Section you show, it will have additional fields below the portion you provide and then the entries and the section ends with a closing section tag.

Upvotes: 2

Related Questions