How to parse Allergy Contents of a NIST validated CCD?

Hi Everyone,

Here is another Continuity of Care Document post. In this blog post I will provide you the code that can we used to parse the Allergy Section of a NIST validated CCD. This CCD will is a NIST standard validated CCD. You can refer this link for the NIST validation tool

Allergy Section:

An Allergy section in the CCD document will contain the following details:

  1. Allergy substance (Allergy causing substance – Medication for patients)
  2. Reaction for Allergy (What reaction the substance causes)
  3. Start date of the allergy
  4. End date of the allergy

 

/* Parse Allergy Section of CCD */
var component = msg[‘component’][‘structuredBody’][‘component’];
// Loop through the <component>
for (i = 0; i < component.length(); i++) {
// 2.16.840.1.113883.10.20.22.4.30 – OID for Allergy section
var getAllergyTemplateId = component[i][‘section’][‘templateId’][‘@root’].toString();
if ((getAllergyTemplateId != null) && (getAllergyTemplateId != ”)) {
// Patient will be allergic to various substance (multiple <entry>)
var entries = component[i][‘section’][‘entry’];
for (j = 0; j < entries.length(); j++) {
// <participant> contains the substance causing allergy
var participant = entries[j][‘act’][‘entryRelationship’][‘observation’][‘participant’];
// <participant><playingEntity> may occur in multiple places so check for ”
if (((participant != null) || (participant != undefined)) && (participant[‘participantRole’][‘playingEntity’][‘name’].toString() != ”)) {
substaceForAllergy = participant[‘participantRole’][‘playingEntity’][‘name’].toString();
logger.debug(“Allergy Substance : ” + substaceForAllergy);
}
var entryRelations = entries[j][‘act’][‘entryRelationship’][‘observation’][‘entryRelationship’];
// Within each <entry> there will be multiple <entryRelationship>
for (k = 0; k < entryRelations.length(); k++) {
if ((entryRelations[k][‘observation’] != null) || (entryRelations[k][‘observation’] != undefined)) {
// 2.16.840.1.113883.10.20.22.4.28 – OID specific for Allergy Status
if (entryRelations[k][‘observation’][‘templateId’][‘@root’].toString() == ‘2.16.840.1.113883.10.20.22.4.28’) {
allergyStatus = entryRelations[k][‘observation’][‘value’][‘@displayName’].toString();
logger.debug(“reaction Status: ” + allergyStatus);
}
// 2.16.840.1.113883.10.20.22.4.9 – OID specific for Allergy Reaction
if ((entryRelations[k][‘observation’][‘text’].toString() != ”) && (entryRelations[k][‘observation’][‘templateId’][‘@root’].toString() == “2.16.840.1.113883.10.20.22.4.9”)) {
// Fetches <text> along with <reference>
var getAllergyReaction = entryRelations[k][‘observation’][‘text’].toString();
// remove <reference>
var splitReferenceTag = getAllergyReaction.split(‘<‘);
// remove <text xmlns=”> namespace
var splitTextTag = splitReferenceTag[1].split(‘>’);
// Get only reaction for specific allergy
reactionForAllergy = splitTextTag[1];
logger.debug(“Allergy Reaction : ” + reactionForAllergy);
// Allergy start Date
if (entryRelations[k][‘observation’][‘effectiveTime’][‘low’][‘@value’].toString() != ”) {
var reactionStartDate = entryRelations[k][‘observation’][‘effectiveTime’][‘low’][‘@value’].toString();
//logger.debug(“reaction Start Date: ” + reactionStartDate);
}
// Allergy End Date
if (entryRelations[k][‘observation’][‘effectiveTime’][‘high’][‘@value’].toString() != ”) {
var reactionEndDate = entryRelations[k][‘observation’][‘effectiveTime’][‘high’][‘@value’].toString();
//logger.debug(“reaction End Date: ” + reactionEndDate);
}
}
}
}
}
}
}

Advertisements

Data Standards – US Healthcare

Lets take three hospitals, A,B and C which uses different data standards for defining Gender in their hospitals

A uses 0,1 for male and female.
B uses 1,0 for male and female,
C uses M,F,U for male, female and unknown.

The data of A and B are different syntactically while the data standards of A and C are different semantically. To achieve uniformity in these, Data standards are proposed. The simplest data standards are as follows:

National Drug Code System:

National Drug Code System  Maintained by US Food and Drug Administration (FDA)
This is a three segment code, that says “who made it / who labelled it”, “what drug is in it”, “what is the package size of this drug”. There are many commercial databases available which provides the same information.

For Example : Please find the below image which is basically a NDC for some medication called “Prozac”. Prozac tablets are basically anti-depressant tablets that will be used for treating/helping patients with Obsessive-Compulsion-Disorder (OCD), or other depression that includes even Bi-polar disorders.

NDC example

The first 4 digits represents the makers of the product. Here Prozac tablets are made by Dista Products. The next 4 digits represents the type the medication will be used, like Prozac as a medication is consumed as Capsule based tablets, it will come in bottle and with 20 mg of each tablets. Then the last two digits represents the count of the tablets, so the Prozac in general will come with the volume of 100 tablets.

As time progress on, many commercial pharmacy databases also started to use the same kind of information or code standards.

RxNorm:

To avoid the complexity of commercial databases who produce same information again and again on the medicines.  Another Standard was initiated by National Library of Medicine (NLM). They created something called RxNorm, which gave much more standard to the medication been used by a particular patient.

These RxNorm codes use a special unique number called RxCUI. which will be unique for different drug. Not all medications will have the same RxCUI code. The RxCUI code for the same drug Prozac and its composition can be found here in this link – RxNorm  Prozac

NLM has also created something called United Medical Language System (UMLS) containing the vast array of multiple healthcare terminologies, vocabularies allows u to download and learn them.

ICD:

Death certificates played a vital role in the development of ICD International classification of Diseases. Dates back to a fine history. Bertillion in chicago 1893 classified some of the possible causes  of death and diseases with a code, which are still used in ICD.

History ICD codes:

We’re gonna move now to standards for problems, diagnoses, the things that afflict patients. These have a very interesting history beginning in the mid 1400s in Northern Italy, when death certificates were first developed. Of course they specified a cause of the death.
200 years later, the bubonic plague erupted, and for the first time people wanted to look at these death certificates as a source of data for analysis. Trying to understand the dynamics this disastrous plague. A couple of decades later in England. Captain John Graunt got interested in why children die, and again, turned to death certificates as a source of information.
In the United States, as early as 1639, it was recognized in Massachusetts that death certificates were important in that they were a public trust, so they needed to be maintained and made available for research and analysis. In 1839, an important figure called William Farr discovered interoperability. That’s my term. Maybe a bit of an exaggeration, but not too much of one. When he noted that each disease has in fact been described in many ways on different certificates.
In 1851, in London, there was a famous Great Exposition. This is what I think was called the Crystal Hall. Countries demonstrated the latest in science and technology, in agriculture and so on and so forth. And people realized that it was very hard to compare across countries because there was no standard way of representing things.

LOINC :

Logical Observation Identifiers Names and Codes Specifically derived for the lab tests that’s been conducted on the patients and their outcomes. www.search.loinc.org/

SNOMED-CT:

ICD-10, LOINC and SNOMED-CT include a relationship, but there is a uniqueness in SNOMED-CT. SNOMED-CT is from IHTSDO. refer www.browser.ihtsdotools.org/ All SNOMED-CT code are followed by a OID code system, this is maintained and managed by a separate organisation. This code System also provides the mapping for the same SNOMED-CT code.

 

HL7v3 Vs CCR Vs CCD Vs CCDA

What is HL7v3 Standard?

The HL7v3 standard is basically a XML messaging format. Developed to bring in the complete medical record/history of a patient.The HL7v3 standard includes both messaging and document standards. The document standard for HL7 v3 is CDA.

What is Continuity of Care Record (CCR) ?

The CCR started out as a three-page paper document which was used in patient care referrals. It was created by the Massachusetts Department of Public Health, and included all the information that was necessary for providers to effectively continue care.

Relation Between CCR & CCD ?

Since CCR is very successful document in the transfer of care scenario, the Massachusetts Department of Public Health teamed up with ASTM and the Massachusetts Medical Society to create an electronic version of CCR That is nothing but CCD.

What is Continuity of Care Document (CCD) ?

CCD stands for Continuity of Care Document and it is based on the HL7 CDA architecture. CDA, or Clinical Document Architecture, is a document standard governed by the HL7 organization. The HL7v3 standard includes both messaging and document standards. The document standard for HL7 v3 is CDA, and one of the documents within the CDA architecture is CCD.

What Does CCD contain ?

A CCD document is not intended to give a complete medical history for a patient. It is intended to include only the information critical to effectively continue care. For example consider a patient is moving from one hospital to another for better treatment or care, then in that case what are all the details that the new facility needs to understand about the patient will be specified in CCD.

General 17 sections used in typical CCD document:

  • Header
  • Allergies
  • Problems
  • Procedures
  • Family history
  • Social history
  • Payers
  • Advance directives
  • Medications
  • Immunizations
  • Medical equipment
  • Vital signs
  • Functional stats
  • Results
  • Encounters
  • Plan of care

List of CCDA provided by HL7 standard:

  • Continuity of Care Document
  • Consultation Notes
  • Discharge Summary
  • Imaging Integration, and DICOM Diagnostic Imaging Reports
  • History and Physical
  • Operative Note
  • Progress Note
  • Procedure Note
  • Unstructured Documents

Add style sheet tag to CCDA

Suppose,  consider you have developed a CCDA from your Mirth and you are writing this to your destination folder. But when the CCDA is written in the file, it should also print XML style sheet tag, to enable human readability. which will be like this.

<?xml-stylesheet type=”text/xsl” href=”testCDA.xsl”?>

You can add this in your generated CCDA by providing this template in the file writer destination on the template section. If not, you can just append this entire tag as a string to the generated XML.

var outputFile = “D://CCDAOutput/”;
var nameData = “filename.xml”;
var humanReadable= ‘<?xml-stylesheet type=”text/xsl” href=”testCDA.xsl”?>’+’\n’;
FileUtil.write(outputFile+nameData, false,humanReadable+output);

Here the FileUtil.write is just works like a file writer destination. outputFile+nameData are directory path and filename, false is denoted for appending the file, weather to append on the same file or not, if not needed of appending then this field can be false, else true.

Remove Segments from CCDA

Aim :

Let us consider that you want to remove certain segments from the incoming CCDA message structure, which your end client thinks that it is not needed for them to receive. How can we remove those specific segments from all  the incoming CCDA files?

Pre-requisite :

  • MirthConnect : 3.4.1.8057 (latest version) — Any previous versions also OK

Channel setup :

  1. Create a New channel name it as your wish Here I have named CCDA Mofification
  2. Click on Set Data Types button set the source connector inbound to XML
  3. Outbound and Destination 1 to XML
     – that’s it the channel setup is done for it.

Source Transformer :

  • Go to the source transformer and right click to create a new step
  • Name the step as Remove segment
  • Select the drop-down of  the step that you have created and select Javascript

 

let us assume that we don’t require the Vital signs segment from the incoming CCDA, though Vital signs segment is very important, I’m just using this to show demo in a very clear and easier format.

Write the following code in the transformer area:

var messageLength = msg[‘component’][‘structuredBody’][‘component’].length();
for(itr=0;itr<messageLength;itr++)
{
if(msg[‘component’][‘structuredBody’][‘component’][itr][‘section’][‘templateId’][‘@root’]==”2.16.840.1.113883.10.20.22.2.4.1″)
{
logger.info(“incoming Message : “+msg);
var removedSeg = msg[‘component’][‘structuredBody’][‘component’][itr][‘section’];
channelMap.put(“removedSegment”,removedSeg);
delete msg[‘component’][‘structuredBody’][‘component’][itr][‘section’];
logger.info(“outgoing Message : “+msg);
}

}

Consider that you provide the following sample data into mirth.

<ClinicalDocument xmlns=”urn:hl7-org:v3″ xmlns:cda=”urn:hl7-org:v3″ xmlns:sdtc=”urn:hl7-org:sdtc” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<realmCode code=”US”/>
<typeId extension=”POCD_HD000040″ root=”2.16.840.1.113883.1.3″/>
<templateId root=”2.16.840.1.113883.10.20.22.1.1″/>

………………………………………….
………………………………………….
………………………………………….
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.14″/>
<id extension=”Functional Status” root=”2.201″/>
<code code=”47420-5″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”FUNCTIONAL STATUS”/>
<title>Functional Status</title>
<text>
<table>
<thead>
<tr>
<th>Functional Condition</th>
<th>Effective Dates</th>
<th>Condition Status</th>
</tr>
</thead>
<tbody>
<tr>
<td/>
<td>null</td>
<td>completed</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode=”DRIV”>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.68″/>
<id root=”87347b49-c2ce-4e3e-9bf4-8fe09e9332db”/>
<code code=”” codeSystem=”2.16.840.1.113883.6.96″ displayName=”completed” xsi:type=”CE”/>
<statusCode code=”completed”/>
<effectiveTime>
<low value=”null”/>
<high value=”null”/>
</effectiveTime>
<value code=”” codeSystem=”2.16.840.1.113883.6.96″ displayName=”” xsi:type=”CD”/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.3.1″/>
<code code=”30954-2″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”RESULTS”/>
<title>Results</title>
<text>
<table>
<thead>
<tr>
<th>Test name</th>
<th>Date</th>
<th>Lab Name</th>
<th>Measure</th>
<th>Units</th>
<th>Reference Range</th>
<th>Lab Value</th>
</tr>
</thead>
<tbody>
<tr>
<td/>
<td>20141015</td>
<td>
<name>Century Hospital</name>
<name>Century Hospital</name>
<name>Century Hospital</name>
<name>Century Hospital</name>
</td>
<td>10^3/ul</td>
<td>10^3/ul</td>
<td> – </td>
<td>220.00</td>
</tr>
</tbody>
</table>
</text>
<entry>
<organizer classCode=”BATTERY” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.1″/>
<id root=”e673e7ec-effc-445c-8d4d-b723ad8327aa”/>
<code code=”43789009″ codeSystem=”2.16.840.1.113883.6.96″ codeSystemName=”SNOMED-CT” displayName=”CBC WO Differential” xsi:type=”CE”/>
<statusCode code=”completed”/>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.2″/>
<id root=”c6a6491d-c11e-425a-ac72-028cb6624783″/>
<code code=”” codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=””/>
<statusCode code=”completed”/>
<effectiveTime value=”20141015″/>
<value unit=”10^3/ul” value=”220.00″ xsi:type=””/>
<author>
<time value=””/>
<assignedAuthor>
<id root=”c6a6491d-c11e-425a-ac72-028cb6624783″/>
<representedOrganization>
<name>&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;</name>
</representedOrganization>
</assignedAuthor>
</author>
<referenceRange>
<observationRange>
<value xsi:type=””>
<low unit=”” value=””/>
<high unit=”” value=””/>
</value>
</observationRange>
</referenceRange>
</observation>
</component>
</organizer>
</entry>
</section>
</component>
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.17″/>
<id extension=”SocialHistory” root=”17eae709-d72c-4b04-a75e-03facbe243d9″/>
<code code=”29762-2″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Social history”/>
<title>Social History</title>
<text>
<table>
<thead>
<tr>
<th>Description</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>Current every day smoker</td>
<td>20141120</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode=”DRIV”>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.78″/>
<id extension=”12345″ root=”2.16.840.1.113883.19″/>
<code code=”ASSERTION” codeSystem=”2.16.840.1.113883.5.4″/>
<statusCode code=”completed”/>
<effectiveTime>
<low value=”20141120″/>
<high value=”null”/>
</effectiveTime>
<value code=”449868002″ codeSystem=”2.16.840.1.113883.6.96″ displayName=”Current every day smoker” xsi:type=”CD”/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.4.1″/>
<id extension=”VitalSigns” root=”17eae709-d72c-4b04-a75e-03facbe243d9″/>
<code code=”8716-3″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Vital signs”/>
<title>Vital Signs</title>
<text>
<table>
<thead>
<tr>
<th>Date / Time</th>
<th>Height</th>
<th>Weight</th>
<th>BMI</th>
<th>BP</th>
</tr>
</thead>
<tbody>
<tr>
<td>20140923</td>
<td>190 in</td>
<td>200 lbs</td>
<td>3.89 NI</td>
<td>220/120</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode=”DRIV”>
<organizer classCode=”CLUSTER” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.26″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”46680005″ codeSystem=”2.16.840.1.113883.6.96″ codeSystemName=”SNOMED-CT” displayName=”Vital signs”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”8302-2″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Height”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”in” value=”190″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”3132″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Weight”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”lbs” value=”200″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”39151″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Body Mass Index”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”NI” value=”3.89″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”” codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=””/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”NI” value=”220″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”” codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=””/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”NI” value=”120″ xsi:type=””/>
</observation>
</component>
</organizer>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

Note : This is a sample data taken from an online open source. You can just google it to find any simple open source CCDA files.

You will get an output like this as follows :

<ClinicalDocument xmlns=”urn:hl7-org:v3″ xmlns:cda=”urn:hl7-org:v3″ xmlns:sdtc=”urn:hl7-org:sdtc” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<realmCode code=”US”/>
<typeId extension=”POCD_HD000040″ root=”2.16.840.1.113883.1.3″/>
<templateId root=”2.16.840.1.113883.10.20.22.1.1″/>

………………………………………….
………………………………………….
………………………………………….

<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.14″/>
<id extension=”Functional Status” root=”2.201″/>
<code code=”47420-5″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”FUNCTIONAL STATUS”/>
<title>Functional Status</title>
<text>
<table>
<thead>
<tr>
<th>Functional Condition</th>
<th>Effective Dates</th>
<th>Condition Status</th>
</tr>
</thead>
<tbody>
<tr>
<td/>
<td>null</td>
<td>completed</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode=”DRIV”>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.68″/>
<id root=”87347b49-c2ce-4e3e-9bf4-8fe09e9332db”/>
<code code=”” codeSystem=”2.16.840.1.113883.6.96″ displayName=”completed” xsi:type=”CE”/>
<statusCode code=”completed”/>
<effectiveTime>
<low value=”null”/>
<high value=”null”/>
</effectiveTime>
<value code=”” codeSystem=”2.16.840.1.113883.6.96″ displayName=”” xsi:type=”CD”/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.3.1″/>
<code code=”30954-2″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”RESULTS”/>
<title>Results</title>
<text>
<table>
<thead>
<tr>
<th>Test name</th>
<th>Date</th>
<th>Lab Name</th>
<th>Measure</th>
<th>Units</th>
<th>Reference Range</th>
<th>Lab Value</th>
</tr>
</thead>
<tbody>
<tr>
<td/>
<td>20141015</td>
<td>
<name>Century Hospital</name>
<name>Century Hospital</name>
<name>Century Hospital</name>
<name>Century Hospital</name>
</td>
<td>10^3/ul</td>
<td>10^3/ul</td>
<td> – </td>
<td>220.00</td>
</tr>
</tbody>
</table>
</text>
<entry>
<organizer classCode=”BATTERY” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.1″/>
<id root=”e673e7ec-effc-445c-8d4d-b723ad8327aa”/>
<code code=”43789009″ codeSystem=”2.16.840.1.113883.6.96″ codeSystemName=”SNOMED-CT” displayName=”CBC WO Differential” xsi:type=”CE”/>
<statusCode code=”completed”/>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.2″/>
<id root=”c6a6491d-c11e-425a-ac72-028cb6624783″/>
<code code=”” codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=””/>
<statusCode code=”completed”/>
<effectiveTime value=”20141015″/>
<value unit=”10^3/ul” value=”220.00″ xsi:type=””/>
<author>
<time value=””/>
<assignedAuthor>
<id root=”c6a6491d-c11e-425a-ac72-028cb6624783″/>
<representedOrganization>
<name>&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;&lt;name xmlns=”urn:hl7-org:v3″&gt;Century Hospital&lt;/name&gt;</name>
</representedOrganization>
</assignedAuthor>
</author>
<referenceRange>
<observationRange>
<value xsi:type=””>
<low unit=”” value=””/>
<high unit=”” value=””/>
</value>
</observationRange>
</referenceRange>
</observation>
</component>
</organizer>
</entry>
</section>
</component>
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.17″/>
<id extension=”SocialHistory” root=”17eae709-d72c-4b04-a75e-03facbe243d9″/>
<code code=”29762-2″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Social history”/>
<title>Social History</title>
<text>
<table>
<thead>
<tr>
<th>Description</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>Current every day smoker</td>
<td>20141120</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode=”DRIV”>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.78″/>
<id extension=”12345″ root=”2.16.840.1.113883.19″/>
<code code=”ASSERTION” codeSystem=”2.16.840.1.113883.5.4″/>
<statusCode code=”completed”/>
<effectiveTime>
<low value=”20141120″/>
<high value=”null”/>
</effectiveTime>
<value code=”449868002″ codeSystem=”2.16.840.1.113883.6.96″ displayName=”Current every day smoker” xsi:type=”CD”/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<templateId root=”2.16.840.1.113883.10.20.22.2.4.1″/>
<id extension=”VitalSigns” root=”17eae709-d72c-4b04-a75e-03facbe243d9″/>
<code code=”8716-3″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Vital signs”/>
<title>Vital Signs</title>
<text>
<table>
<thead>
<tr>
<th>Date / Time</th>
<th>Height</th>
<th>Weight</th>
<th>BMI</th>
<th>BP</th>
</tr>
</thead>
<tbody>
<tr>
<td>20140923</td>
<td>190 in</td>
<td>200 lbs</td>
<td>3.89 NI</td>
<td>220/120</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode=”DRIV”>
<organizer classCode=”CLUSTER” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.26″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”46680005″ codeSystem=”2.16.840.1.113883.6.96″ codeSystemName=”SNOMED-CT” displayName=”Vital signs”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”8302-2″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Height”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”in” value=”190″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”3132″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Weight”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”lbs” value=”200″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”39151″ codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=”Body Mass Index”/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”NI” value=”3.89″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”” codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=””/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”NI” value=”220″ xsi:type=””/>
</observation>
</component>
<component>
<observation classCode=”OBS” moodCode=”EVN”>
<templateId root=”2.16.840.1.113883.10.20.22.4.27″/>
<id root=”14c09c70-b5b1-470d-9fa4-c5a1e0562681″/>
<code code=”” codeSystem=”2.16.840.1.113883.6.1″ codeSystemName=”LOINC” displayName=””/>
<statusCode code=”completed”/>
<effectiveTime value=”20140923″/>
<value unit=”NI” value=”120″ xsi:type=””/>
</observation>
</component>
</organizer>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

This is a generalized code, that will remove the vital signs status for any incoming CCDA files. You can just change the template ID of the above provided code and remove any data that you want to remove to achieve this.

 

 

 

Blog at WordPress.com.

Up ↑