That did it. Thanks Paul!
- Log in to post comments
That did it. Thanks Paul!
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.
I knew I'd find it as soon as I posted. I just did a $$$LOGINFO("string")
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)) }' |
Good to know. I'll keep that in mind as I move forward. Thanks.
FWIW, I ended up creating a custom method that turned out to be very easy and used the method as a function in my routing rule:
/// Get the alert group of the given component
ClassMethod GetAlertGroup(ComponentName As %String) As %String
{
Set tAlertGroup = ##class(Ens.Director).GetHostSettingValue(ComponentName,"AlertGroups")
Quit tAlertGroup
}
Thanks, Jeff. I'll explore the managed alerts approach.
Solved. I added a code statement as the first line of my DTL as follows:
set target = ##class(EnsLib.HL7.Message).ImportFromString(source.SchedulingData)
set target.DocType = ##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType("2.3.1","SIU_S12",tSC)
This loaded my HL7 class with the message from my SQL table field.
Thanks to David for steering me in the right direction.
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?
It's an external database, I have the java gateway service up and running. I just want to go into ensemble, start the service and have it run through my database once and stop. I update a processed flag in the database, so the next pass won't pick up already read records. Right now I have the call interval set to 86400, so it will run every two days, which would be ok, but really not needed.
Got it, I did miss the $tr
I like this approach. Didn't know I could call the Method directly from the BPL. Thanks.
The second approach (set context.NewID=$EXTRACT("0000000000"_context.PatientID,*-9,*)) worked great. When I checked the documentation for the $JUSTIFY, it doesn't say you can specify your pad character.
Looked like only spaces to me: $JUSTIFY(expression,width[,decimal])
I did as mentioned by David and Eduard above. I have one small problem. When I go to edit a rule or constraint, I get the following error. It is still looking for my old production name:
That worked great. Thanks guys
Thanks, the piece I was missing was creating the link table to the external table. I set that up and now I can access my external database as if it were local.