Question
· Nov 19, 2018

Referencing CCDA elements in a custom class

I've created a CCDA schema with from an xsd ad now am trying to reference the CCDA elements in a custom class (process). What is the syntax for referencing my CCDA elements?

I've tried the following

Method OnRequest(pRequest As EnsLib.EDI.XML.Document, Output pResponse As Ens.Response) As %Status
{
// constructing PDQ Request
    set tPDQRequest = ##class(HS.Message.PatientSearchRequest).%New()
    $$$LOGINFO("Starting Process")
    set tPDQRequest.Title=pRequest.GetValueAt("/title")
    $$$LOGINFO("Title: "_tPDQRequest.Title)
    set tPDQRequest.LastName=pRequest.GetValueAt("/recordTarget(1)/patientRole/patient/name(1)/choice(1)/family")

    $$$LOGINFO("LastName: "_tPDQRequest.LastName)

None of my log statements output anything. Any hints would be appreciated.

Discussion (4)0
Log in or sign up to continue

So, I am able to reference the elements in the CCDA as follows:

The address:  <streetAddressLine>123 FAKE ST</streetAddressLine>

I reference as pRequest.GetValueAt("/ClinicalDocument/recordTarget/patientRole/addr/streetAddressLine") and I get my value. But when the source field has just a value or code, I’m not sure of the syntax on the GetValueAt:

 e.g. <administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1" displayName="Male" />

 OR <birthTime value="19560816" />

 

Any hints would be appreciated.

 

Thanks.