Thanks you @Guillaume Rongier !
Hopefully this will be helpful
- Log in to post comments
Thanks you @Guillaume Rongier !
Hopefully this will be helpful
Hello @Patrick Jamieson
Thank you! for the suggestion. definitely will try 2023.3 version
As per the documentation The I had raised the same question Currently, InterSystems products do not provide the ability to validate a resource against a profile. Validation is limited to the base FHIR specification.
.png)
Thanks @Luis Angel Pérez Ramos for pointing the documentation
Thanks for pointing! I thought it's implemented. So, As of now Intersystems FHIR server doesn't have the ability to validate the resource against the profile. Then FHIR Client system need to take care of it
Hello @Luis Angel Pérez Ramos
Of course, I had added the profile information in the meta data element. like below.
{
"resourceType":"Patient",
"meta"{
"profile":[
"http://eample.org/fhir/StructureDefinition/TutorialPatient"
]
},
"name":[
{
"use":"official",
"given":[
"test"
],
"family":"Patient"
}
]
}Hello
You can send you're POST/GET URL's as part of the method itself. Refer the below sample codes
Set httprequest=##class(%Net.HttpRequest).%New()
Set httpRequest.ContentType = "application/json"
Set httpRequest.Server = "renderProjectName.onrender.com"
set httprequest.https=1 ;add this additional set if you're going to make it as a HTTPS call
set httprequest.SSLConfiguration = "your ssl certificate" ; include the certificate as well for HTTPS call's
Do httprequest.Post("/")As for As I see there is no option to export the Business partners along with production export. Even there is no option with with deployable settings and config.Item definition as well. The Business partner details are stored in Ens. Config.BusinessPartner.
So, I hope you need to manually export your global's and import in to the another instance.
.png)
Basically %JSONExport() API method only works if you're class definition extends with %JSON.Adaptor. class You can even use the below to write your JSON response in UI
do ##Class(%REST.Impl).%WriteResponse(response)hello @Yone Moreno
You don't need to include the query params in the Url. That's is basically available in %request CSP object. You can take the query parameter values like below. And :studies represents it's a dynamic URL parameter value.
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/:studies" Method="GET" Call="consultarEstudiosDatosPaciente"/>
</Routes>
}
ClassMethod consultarEstudiosDatosPaciente(studies As %String="") As %Status
{
set patientId = %request.Get("patientId")
/// or
set patientId = %request.Data("patientId", 1)
return $$$OK
}
As far as we don't have any default functionality for JSON beautify/Pretty print option in interoperability. There is alternative OEX app(https://openexchange.intersystems.com/package/JsonTraceViewer ) available to do it.
Thanks you all!
Generally we can't execute the macros directly in terminal, studio output. The Macro preprocessor aka MPP do converts the marcos into the expression or function at the time of compilation. So, You can open and use the .int file for the specific code.
Test.mac
macromac
write $$$EnsMajorVersion ;
Test.int
macromac
write $system.Version.GetMajor() ;
Get the relevant value of macros and execute it in terminal or output window.
Hello @Colin Brough
I Believe, There is no functional difference between rule 1 and rule 2 except the invoking the DTL twice and finally call the Target. By default it has the feature to call multiple targets once the transformation completed. You utilized the feature in rule 2. That's the exact way to call multiple target unless different message and different transformation required. There will be a performance difference should be there. Because it executes the DTL first every time and eventually call the targets asynchronously(Whether it's asynchronous or synchronous It depends on the configuration in production Business process).
xData block data's are basically stored the as a stream object in the class definition. If this is a property oriented then create a stream property %Stream.GlobalCharacter and store the values.
You can do $Name for the global and use your subscript runtime
set gbl= $NA(^ABC)
write @gbl@(1,2)
set sub=1
write @gbl@(sub)
%GetSwizzleObject - is basically belongs from the %Persistent Class. The HS.FHIR.DTL.vR4.Model.Resource.Practitioner is extending from the %Library.RegisteredObject class. For the store error you can try increasing the process memory allocation programmatically to maximum by set $zstorage=-1 for the specific process.
Thanks for the response. The SELECTMODE = "RUNTIME" is not works to retrieve the object as a value from the object properties.
Hi @RKumar
You need to set the properties SSLConfiguration and UseSTARTTLS for enabling SSL configuration
set smtp=##class(%Net.SMTP).%New()
set smtp.SSLConfiguration="TestSSL" ;your SSL configured name in System Management Portal
set smtp.UseSTARTTLS=1
/*
... Additional required property set
*/kudos to all the winners👏
Thanks @Sylvain Guilbaud
This is pretty useful.
The syntax of $$$LOGINFO won't allow you make it in multiple lines. Instead you can set it in local variable and pass the variable in LOGINFO for better visibility
set log= "object: 'This is a try'"
_"this is the second line with an example parameter: "_$get(x,1)
_"this is the third line with an example parameter: "_$get(y,5)
$$$LOGINFO(log)You can use %File API class to create a directory. This result will be 1 if directory is created else 0. Refer the sample code below
set directory="c:\Test"
write ##class(%File).CreateDirectory(directory) ; result will be 1 if create else 0Apparently, The quick stream's are cleared end of process.
Thanks!
I agree with Mr @Mihoko Iijima mentioned points. If Interoperability production need to be executed as part of the FHIR REST call configure HS.FHIRServer.Interop.Service this class in both Production and FHIR server configuration page. No need do it for using the direct Intersystems FHIRServer storage.
You need to pass the subscripts also part of the $NAME itself to make it dynamic instead start from the beginning
USER>s subscript="a" ;your dynamic subscript
USER>set GlobalVar=$NAME(^["IRISMYDEV"]TEST(subscript)) ; pass the subscript into $NAME
USER>write GlobalVar
^["IRISMYDEV"]TEST("a")
USER>set sub="" write $o(@GlobalVar@(sub),1,data) ; next subscript of "a"
b
USER>write @GlobalVar
Test
USER>write GlobalVar
^["IRISMYDEV"]TEST("a")You could add $char(13,10) or $$$NL ( this also refer $c(13,10) ) macro to make a new line
$$$LOGINFO("object: 'This is a try'"_$$$NL_"this is the second line with an example parameter: "_$get(x)_$$$NL_"this is the third line with an example parameter: "_$get(y))You need to use the $NAME function set the global variable into local variable to process global names extended global reference dynamically. There is no problem with setting global name in local variable if it's belongs from the current namespace. Use indirection( @ ) operator to do $query,$order,$data string functions and get values from it(Suggest to use $NAME for current namespace global as well) .
USER>set GlobalVar=$NAME(^["IRISMYDEV"]TEST)
USER>zwrite @GlobalVar
^["IRISMYDEV"]TEST("a")="Test"
^["IRISMYDEV"]TEST("a","b")="66739,34774"
^["IRISMYDEV"]TEST("a","b","c")="Apple\Orange-Peach#ball\1#0#1#1"
USER>set sub=$query(@GlobalVar) for quit:sub="" write sub,! set sub=$Query(@sub)
^["IRISMYDEV"]TEST("a")
^["IRISMYDEV"]TEST("a","b")
^["IRISMYDEV"]TEST("a","b","c")
by using this you can take the values. Check last global reference by using the $zreference function.
Have you tried to pass the provider as a host variable in the query
SELECT ID FROM TestTable WHERE ProviderName = :PROVIDER AND IDType= 'BPI'
Hello @Muhammad Waseem
Maybe you can try extract the patient resource from bundle or use if it's already resource. Load into FHIR model patient class HS.FHIR.DTL.vR4.Model.Resource.Patient with the extracted resource. Then you can convert the Birthdate and validate the Age. You can use the same logic in your code DTL in your FHIR process in between FHIR service (HS.FHIRServer.Interop.Service) to FHIR operation (HS.FHIRServer.Interop.Operation)
ClassMethod VaidatePatientResource(patientResourceStreram As %Stream.Object)
{
#dim patient As HS.FHIR.DTL.vR4.Model.Resource.Patient
try {
set patient = ##class(HS.FHIR.DTL.vR4.Model.Resource.Patient).FromJSON(patientResourceStreram)
Set age = $horolog - $ZdateH(patient.birthDate,3)\360
if age<18 $$$ThrowStatus($$$ERROR($$$GeneralError, "Age is less than 18"))
}
catch ex {
w ex.DisplayString()
}
}