To convert FHIR R4 to SDA you have to use this helper class :
HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process
This class take in input a message of this kind : HS.FHIRServer.Interop.Request or HS.Message.FHIR.Request.
So if you want to convert an json FHIR file to SDA, you have to read the file from a business service cast you file to one of this message and send it to the helper class.
Here is and Business service example of reading fhir json files :
Class BS.FHIRFileService Extends Ens.BusinessService
{
Parameter ADAPTER = "EnsLib.File.InboundAdapter";
Property TargetConfigNames As %String(MAXLEN = 1000) [ InitialExpression = "BusinessProcess" ];
Parameter SETTINGS = "TargetConfigNames:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}";
Method OnProcessInput(pDocIn As %RegisteredObject, Output pDocOut As %RegisteredObject) As %Status
{
set status = $$$OK
try {
set pInput = ##class(HS.FHIRServer.Interop.Request).%New()
set tQuickStream = ##class(HS.SDA3.QuickStream).%New()
do tQuickStream.CopyFrom(pDocIn)
set pInput.QuickStreamId= tQuickStream.Id
for iTarget=1:1:$L(..TargetConfigNames, ",") {
set tOneTarget=$ZStrip($P(..TargetConfigNames,",",iTarget),"<>W") Continue:""=tOneTarget
$$$ThrowOnError(..SendRequestSync(tOneTarget,pInput,.pDocOut))
}
} catch ex {
set status = ex.AsStatus()
}
Quit status
}
}
You can find more information from this documentation :
Thank you very much, HS.FHIR.DTL.Util.API.Transform.FHIRToSDA3 is in the namespace named HSLIB. When I try to switch to this space, the interface displays The "HSLIB namespace does not support Analytics", I would like to ask How to solve it
Hi Xiong,
To convert FHIR R4 to SDA you have to use this helper class :
HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process
This class take in input a message of this kind : HS.FHIRServer.Interop.Request or HS.Message.FHIR.Request.
So if you want to convert an json FHIR file to SDA, you have to read the file from a business service cast you file to one of this message and send it to the helper class.
Here is and Business service example of reading fhir json files :
You can find more information from this documentation :
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.c...
Thank you very much, HS.FHIR.DTL.Util.API.Transform.FHIRToSDA3 is in the namespace named HSLIB. When I try to switch to this space, the interface displays The "HSLIB namespace does not support Analytics", I would like to ask How to solve it
You can't work directly in HSLIB, you have to create your own namespace to work with.
In a terminal :
If you are not familiar with Namespace, HSLIB, Ensemble first check for training here :
https://learning.intersystems.com/course/view.php?id=243