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.

Ended up using the custom method that Scott so kindly provided. Thanks for the help.

The following attempts give me a syntax error "Error parsing expression"  when I save the rule:

HL7.{OBXgrp(1).OBX:ObservationValue(1)} Matches ?3N

HL7.{OBXgrp(1).OBX:ObservationValue(1)} Matches ?"-"

HL7.{OBXgrp(1).OBX:ObservationValue(1)}?"-"

HL7.{OBXgrp(1).OBX:ObservationValue(1)} ?"-"

Any hints on the syntax? I've tried

HL7.{OBXgrp(1).OBX:ObservationValue(1)} Matches ?3N

HL7.{OBXgrp(1).OBX:ObservationValue(1)} Matches ?"-"

The following: HL7.{OBXgrp(1).OBX:ObservationValue(1)} Matches "?.A"

gives me the following error:

 ERROR <Ens>ErrBPTerminated: Terminating BP iSirona_Proc2 # due to error: ERROR <Ens>ErrException: <SYNTAX>zMatches+1 ^Ens.Util.FunctionSet.1 -- logged as '-'
number - @'
Quit $S(""=$g(pattern):""=$g(value), 1:$g(value)?@$g(pattern)) }'
> ERROR <Ens>ErrException: <SYNTAX>zMatches+1 ^Ens.Util.FunctionSet.1 -- logged as '-'
number - @'
Quit $S(""=$g(pattern):""=$g(value), 1:$g(value)?@$g(pattern)) }'

This is in a routing rule, so when I have:

when HL7.{OBXgrp(1).OBX:ObservationValue(1)} Matches "[a-z]"

and when I run a message through I get the following error:

 ERROR <Ens>ErrBPTerminated: Terminating BP iSirona_Proc2 # due to error: ERROR <Ens>ErrException: <SYNTAX>zMatches+1 ^Ens.Util.FunctionSet.1 -- logged as '-'
number - @'
Quit $S(""=$g(pattern):""=$g(value), 1:$g(value)?@$g(pattern)) }'
> ERROR <Ens>ErrException: <SYNTAX>zMatches+1 ^Ens.Util.FunctionSet.1 -- logged as '-'
number - @'
Quit $S(""=$g(pattern):""=$g(value), 1:$g(value)?@$g(pattern)) }'

The SQLSIUInRequest class just looks like this:

Property CounterID As %Integer;
Property Enumber As %String;
Property SourceIDType As %String;
Property EpicProviderID As %String;
Property EpicDepartmentID As %String;
Property SchedulingData As %String(MAXLEN = 2048);

Where the SchedulingData field contains the HL7 message which was inserted using a DTL with a code statement as follows:

 set SIUString = source.OutputToString("|^~\&",.tSC)
 if $$$ISERR(tSC) quit
 set target.SchedulingData = SIUString

I am not doing an ImportFromString yet. If I was to use the ImportFromString, would I put in in the OnProcessInput method in my inbound service?