go to post Ashok Kumar · Feb 27 Hi @Sebastian Thiele Here is the Encounter resource. I'm using IRIS for Windows (x86-64) 2024.1.1 url : http://localhost:52773/csp/healthshare/learning/fhir/r4/Encounter?&date=lt2024-10-27T15:29:00Z Spoiler {"resourceType":"Encounter","id":"example-01","meta":{"lastUpdated":"2024-10-27T15:30:00Z","profile":["https://nrces.in/ndhm/fhir/r4/StructureDefinition/Encounter"]},"text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"> Admitted to Cardiac Unit,UVW Hospital between June 28 and July 9 2020</div>"},"identifier":[{"system":"https://ndhm.in","value":"S100"}],"status":"finished","class":{"system":"http://terminology.hl7.org/CodeSystem/v3-ActCode","code":"IMP","display":"inpatient encounter"},"subject":{"reference":"Patient/example-01"},"period":{"start":"2024-10-29T15:30:00Z","end":"2024-10-29T19:30:00Z"},"hospitalization":{"dischargeDisposition":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/discharge-disposition","code":"home","display":"Home"}],"text":"Discharged to Home Care"}}}
go to post Ashok Kumar · Feb 27 Hello @Sebastian Thiele As per the documentation, date is fully supported search parameter. so, This should work prefix lt dates I've 2 encounter resource in my FHIR server and I've tested with different dates ex: &date=lt2024-10-27T15:29:00Z period and it works to me
go to post Ashok Kumar · Feb 26 Awesome, It's pretty useful. However, If alias is retains like :history -Display command history its' really helpful and no need to define the shortcuts again.
go to post Ashok Kumar · Feb 23 Hello @Kevin Mayfield Instead FromJSON() write a custom class to parse the Binary Resource and set it into the FHIR model class. Here I convert the the data (which is the Binary resource -pdf or anything) to stream and set it in the data field of the HS.FHIR.DTL.vR4.Model.Resource.Binary class ClassMethod SetBinaryR4(json As %DynamicObject) { Set obj = ##class(HS.FHIR.DTL.vR4.Model.Resource.Binary).%New() Set obj.contentType = json.contentType #; convert to stream to prevent from the <MAXSTRING> error Set dataAsStrm = json.%Get("data",,"stream") Set obj.data = dataAsStrm Set obj.id = json.id #; set binary data element as stream for "Binary" resource. ZWrite obj.data.Read() } Thanks!
go to post Ashok Kumar · Feb 21 Hello @Kevin Mayfield %GetNext retrieves values from the JSON object/array and assigns them to a local variable. However, the BLOB/streams exceed the maximum local length (3641144), MAXLEN doesn't cause the issue because it's a registered object, and the values are currently stored in memory. Therefore, AFAIK FromJSON is not suitable for handling such a large dataset.
go to post Ashok Kumar · Feb 13 Hello @Jan K Yes, PS256 is not supported. Can you try it in python JWT library packages.
go to post Ashok Kumar · Feb 10 Hello @Ali Chaib You need to create you're custom DTL under "HS.Local.FHIR.DTL" Once DTL is created. Execute set status = ##class(HS.FHIR.DTL.Util.API.ExecDefinition).SetCustomDTLPackage("HS.Local.FHIR.DTL") this and this will configure the customize DTL entry in the ^HS.XF.Config global it's responsible for execute your DTL Here is the documentation which covers most customization. As I mentioned earlier, You need to the additional properties in respective SDA extension class.
go to post Ashok Kumar · Feb 10 Hello @Ali Chaib FHIR to SDA Yes we have built in transformation class available to FHIR ⇆ SDA and HS.FHIR.DTL.Util.API.Transform.FHIRToSDA3 is used to convert to SDA3 to FHIRIf you're goal to to convert to FHIR to SDA object then "HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process" use this Business Process(BP) class to convert but this will send the request to BO again based on the BP configuration. Otherwise programmatically construct the input and pass the required values to the method in TransformStream class transformation class(which is in FHIR to SDA conversion business process) HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR for convert FHIR to SDA SDA3 to HL7 conversion There is no method for programmatically converting from SDA to HL7 v2. from documentation. So, You need to read the JSON response, extract the required information, and transform it directly into an HL7 message There are multiple DTL's available for SDA3 to HL7 v2 in package "HS.Gateway.SDA3.SDA3ToHL7." Can you check and utilize if it's helps Thanks!
go to post Ashok Kumar · Feb 10 Hi @Phillip Wu If you're create new object values. Means, The %New() - Creates a new instance of object and It invokes the user provided callback method "%OnNew()". You can define your properties if you want in that call back methods. Class Backup.Task Extends %Persistent { Property TaskName As %String; Property TaskDescription As %String; Method %OnNew(pTaskName As %String, pTaskDescription As %String) As %Status { Set ..TaskName = pTaskName Set ..TaskDescription = pTaskDescription Return $$$OK } ClassMethod CreateNewTask() { Set taskObj = ##Class(Backup.Task).%New("DailyBackup","Runs a daily backup") Set st = taskObj.%Save() } } If you want to fetch the values of already stored. You have to use the %OpenId(id) and pass the id to open the instance of the expected object and you can fetch the values ClassMethod GetTaskDetails(taskId) { Set taskObj = ##Class(Backup.Task).%OpenId(taskId) Set lastRunStatus = taskObj.LastRunStatus }
go to post Ashok Kumar · Feb 8 You can download the latest community edition of InterSystems iris and iris for health in https://evaluation.intersystems.com/
go to post Ashok Kumar · Feb 7 Hello @Ali Chaib SDA, or Summary Document Architecture is an intermidary format. It's used to easily convert between multiple data formats--such as HL7 V2, C-CDA, C32, HL7 FHIR, and others. I hope You are sending a GET request via HTTPOperation in FHIR interoperability production. You'll get the http response. There is no predefined transformation available to do it. You need to programmatically convert the response. I just convert the FHIR operation outcome to FHIR R4 outcome object directly. ClassMethod fhirresponse() { #;Assume the json as a fhir response Set fhiResponse = {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"not-found","diagnostics":"<HSFHIRErr>ResourceNotFound","details":{"text":"No resource with type 'Task' and id '33'"}}]} #dim opoutcome As HS.FHIRModel.R4.OperationOutcome = ##Class(HS.FHIRModel.R4.OperationOutcome).fromDao(fhiResponse) Write opoutcome.issue }
go to post Ashok Kumar · Feb 7 Hello @Ali Chaib I could find the relevant SDA class resource HS.SDA3.Task for the FHIR Task. AFAMA, there is no built in DTL or relevant FHIR model class available to transfer SDA to FHIR resource. for now, You can create a your own FHIR model class for Task and create a customized DTL under HS.Local.FHIR.DTL. package use the SDA3.Task as destination class for transformation.
go to post Ashok Kumar · Feb 6 Yes, the journal doesn't contain that information and maybe it's operational overhead to hold this additional information. As always using the program debugger and verify the routine. This is a general question, as I mentioned earlier there are multiple is routines and classes executed and the global are set via indirection, Xecute the predefined code and usual direct set. Thanks for your response @Vic Sun
go to post Ashok Kumar · Feb 6 Hello @Vic Sun To summarize the situation, when executing a program, it calls various routines and classes, the expected global values is set somewhere in between the flow. I need to determine where a specific global was set. The journal contains details like process ID, database values (old and new), and more. So, Maybe If the journal includes an additional entry in the format of label+offset^routine indicating where the global was set it's easy to track for my case.
go to post Ashok Kumar · Feb 3 Hello @JIM WHEELER Seems you're trying to store the error message. If yes, You can use $SYSTEM.Status.GetErrorText(status) to get the error text of the and store. If you want to convert the list build values as a string. use ##class(%Utility).FormatString() method USER>Set str = ##class(%Utility).FormatString($LB(1,2)) USER>zw str str="$lb(1,2)"
go to post Ashok Kumar · Feb 3 Hello @Deepa Shahi You can customize the SDA3 package. A native discrete SDA class is available to convert the data's from HL7 to FHIR and vise versa. In this case, HS.SDA3.Encounter is the SDA class. There is an additional editable extension class( "HS.Local.SDA3.EncounterExtension" - Encounter) available in these primary SDA classes to customize data elements. You can define all your required data elements in to this extension class and compile the package. If you're using the SDA to FHIR conversion by DTL native approach. Customize the DTL You have to copy the existing DTL "HS.FHIR.DTL.SDA3.vR4.Encounter.Encounter" to "HS.Local.FHIR.DTL.SDA3.vR4.Encounter.Encounter". Before customizing DTLs, you need to specify a single package for all customized DTL classes. InterSystems recommends naming the class package: HS.Local.FHIR.DTL. Now you can modify the newly copied DTL based on your requirement. this newly created DTL is not invoked by default. So, execute below code in your FHIR enabled namespace. The FHIR API classes use this HS.Local.* DTL packages while generating the resources ("Encounter" ) set status = ##class(HS.FHIR.DTL.Util.API.ExecDefinition).SetCustomDTLPackage("HS.Local.FHIR.DTL")
go to post Ashok Kumar · Jan 31 Hello @Gabriel Santos AFAIK, The required property keyword works on literal, Collection, stream, serial, object valued properties except the %DynamicArray and %DynamicObject. Because by default the property methods(Getter) was created and it assign the values for %DynamicArray is "[]" and "{}" for dynamicObject even though if you assign empty string it overwrites it. so, The %ValidateObject() doesn't include these two objects for validation.
go to post Ashok Kumar · Jan 24 As you know the swagger is used to design the API documentation first, and then build the REST API based on that design. IRIS or other API systems don't inherently know about the payload, the return response, or the specific responses for status codes like 200, 400, or 500 unless it's specified. You're right about the traditional approach. Creating REST services manually doesn't have knowledge of these details. It generates the Swagger documentation based on the information available in the UrlMap and the class method in the dispatch class. Add your comments on top of the class method (meta data details) will be set into the description in swagger Spoiler If you want your API to be well-documented, it’s better to follow a spec-first approach, as this approach captures crucial details like paths, method types, descriptions, path parameters, query parameters, and responses. Thanks! /// The comment added for generated for swagger 2.0/// return type is %String/// Two path parameters/// one query parameterClassMethod test(id As %String, cid As %String) As %String{ return 1} Swagger: "/test": { "get": { "operationId": "test", "description": " The comment added for generated for swagger 2.0 return type is %String Two path parameters one query parameter ", "x-ISC_ServiceMethod": "test", "x-ISC_CORS": true, "responses": { "default": { "description": "(Unexpected Error)" }, "200": { "description": "(Expected Result)" } } }