User bio
404 bio not found
Member since Jul 2
Replies:

I am using studio's terminal to run the code.

set ccdaStream = ##class(%Stream.FileBinary).%OpenId("/tmp/CCDA_CCD_b1_Ambulatory_v2.xml")

write "Size of CCDA Stream: ", ccdaStream.Size,!
Size of CCDA Stream: 171823
set xsltTransform = "SDA3/CCDA-to-SDA.xsl"
set tTransformer = ##class(HS.Util.XSLTTransformer).%New()

set tSC = tTransformer.Transform(ccdaStream, xsltTransform, .sdaStream)

if 'tSC write "Transformation to SDA3 failed with error ",$system.Status.GetErrorText(tSC),!

set fhirStream = ##class(%Stream.TmpBinary).%New()

set SDA3ToFHIRObject = ##class(HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR).TransformStream(sdaStream, "HS.SDA3.Container", "R4")

if '$isobject(SDA3ToFHIRObject.bundle) write "Failed to transform SDA3 to FHIR",!

do SDA3ToFHIRObject.bundle.%ToJSON()
{"resourceType":"Bundle","type":"transaction","entry":[]}
Certifications & Credly badges:
Aman has no Certifications & Credly badges yet.
Global Masters badges:
Aman has no Global Masters badges yet.
Followers:
Aman has no followers yet.
Following:
Aman has not followed anybody yet.