Jorge de la Garza · Mar 22, 2017 go to post

Hi Surya,

HealthShare has no single transform that can convert from HL7 to FHIR.  Rather, what you would do is, first convert the HL7 to an SDA3 container via the Ensemble operation HS.Gateway.HL7.InboundProcess, then convert the SDA3 container into a FHIR bundle via the process HS.FHIR.FromSDA.DTL.Transaction.Process.

Jorge de la Garza · Jan 10, 2017 go to post

One of the very first things I learned about programming as a wee lad taking Computer Science in high school is that GOTOs should be avoided, as they lead to what the textbook called "spaghetti code".

XKCD agrees, but for a different reason:

https://www.xkcd.com/292/

Jorge de la Garza · Nov 16, 2016 go to post

I suspect this can be done in v3, but I will have to defer to my colleagues who are experts on it.

Jorge de la Garza · Nov 10, 2016 go to post

Hi Scott,

One way you could do this is via an MDM^T02 HL7 message.  There is actually an example message containing a PDF document distributed with HealthShare: <install-directory>\Data\Scenario_4.hl7

The document data is encapsulated in a series of OBX segments:

OBX||ED|||^^PDF^Base64^JVBERi0xLjINCiXi48/TDQolICAgICAgICAgIA0KJTEwMDIzMFszMl0NCjEgMCBvYmogDTw8DQov

The critical pieces of this are:

OBX-2: Must be "ED" for "Encapsulated Data"

OBX-5.3: Must be the file type.  In this case it's "PDF".  If you want to view this document in the HealthShare Clinical Viewer, then you can find a list of supported doc types at websys.Document:ValidTypes in the Access Gateway namespace.

OBX-5.4: Must be "Base64" if the data is base64-encoded, otherwise it can be left blank.

OBX-5.5: The document data

Best,

Jorge

Jorge de la Garza · Nov 2, 2016 go to post

I know of no such built in tool, however here's a routine I wrote to pretty print an XML string:

PrettyPrintXML(pXML)	for tI = 1:1:10 write ! }	set tTabCount = 0	// if starting with an XML prolog, do not increment tab on next line	if ($E(pXML,1,5)="<?xml") 		set tI = $FIND(pXML,">")		set $EXTRACT(pXML,tI-1) = ">"_$C(13,10) 	}	else set tI = 1 	for {		set tI = $FIND(pXML,"<",tI) quit:tI=0		//cdata		if ($EXTRACT(pXML,tI,tI+7)="![CDATA[") {			//set tTabCount = tTabCount + 1			do Tabs			set $EXTRACT(pXML,tI-1) = tTabs_"<"			set tI = $FIND(pXML,">",tI) quit:tI=0			set $EXTRACT(pXML,tI-1) = ">"_$C(13,10)			//set tTabCount = tTabCount - 1		}		//open tag		elseif ($EXTRACT(pXML,tI) '= "/") {			do Tabs			set $EXTRACT(pXML,tI-1) = tTabs_"<"			set tI = $FIND(pXML,">",tI) quit:tI=0			// only increment tab count if this is not an empty tag (<tag/>)			if ($E(pXML,tI-2)'="/") set tTabCount = tTabCount + 1 }			//if followed by another open tag, insert a newline before it			if ($EXTRACT(pXML,tI) = "<") set $EXTRACT(pXML,tI) = $C(13,10)_"<" }		}		//close tag		else {			set tTabCount = tTabCount - 1			//if following another close tag, put tabs before this one ($C(62) = ">")			if ($EXTRACT(pXML,tI-4,tI-2) = $C(62,13,10)) {				do Tabs				set $EXTRACT(pXML,tI-1) = tTabs_"<"			}			set tI = $FIND(pXML,">",tI) quit:tI=0			set $EXTRACT(pXML,tI-1) = ">"_$C(13,10)		}	}	write pXML	quitTabs	set tTabs = ""	for i=1:1:tTabCount set tTabs = tTabs_$C(9) }	quit