Thank you so much @Ashok Kumar 

According to the documentation, the recommended strategy for customizing a DTL transformation (used for converting SDA to FHIR and vice versa) is to:

  1. Create a copy of the standard DTL, and
  2. Modify it.

Once a custom DTL package is specified, the transformation automatically selects the custom DTL instead of the default one.

This approach does not cover a strategy of creating a new DTL from scratch.

And let's say I decided to try it, I have a few questions:

  1. After creating a custom DTL, how do I access it within the transformation logic?
    • I understand that we have the function GetDTL(), which calls a global ^HS.XF.Transform to retrieve the appropriate transformation.
  2. Should I manually add my custom DTL to the built-in global (^HS.XF.Transform) to ensure it's selected correctly?
  3. Is there any official documentation that covers this specific part—such as modifying the global, necessary configuration steps, or best practices—to avoid missing anything critical?

Thank you @Ashok Kumar 

Yes, I fully understand that SDA (Summary Document Architecture) is an intermediary format.
And yes, I am using the HTTP operation in my interoperability production.

When you say "You need to programmatically convert the response", do you mean:

  • Convert it into an object, or
  • Convert it into SDA?

If the goal is to convert it into an object, does that mean I should manually read the JSON entities/nodes, extract the relevant information, and transform it directly into an HL7 message—bypassing SDA entirely?

If the goal is to convert it into SDA, does that mean I must first transform the FHIR response into a FHIR request? If so, how? Because FHIR responses often contain additional fields that do not appear in FHIR requests, such as:

"type": "searchset",
"total": 1,
"search": {
    "mode": "match"
}

I’m asking these questions because, as you know, InterSystems provides built-in functionalities to automatically convert FHIR requests into SDA, such as:

  • Process: HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process
  • Transform class: HS.FHIR.DTL.Util.API.Transform.FHIRToSDA3

These components accept FHIR requests and successfully transform them into SDA.

However, when handling FHIR responses, I tried extracting the payload, creating a new message, and sending it to HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process. Unfortunately, the transformation failed—possibly because the FHIR response contains additional fields that the built-in functions don’t recognize.

It's worth noting that when I send a FHIR request to the exact same process, it transforms correctly into SDA (without these extra fields).

The problem was that the built in code was messing with the URL were using which was causing this error every time... Try to use a tool to capture the URL (in my case sometime it was sending "/" and sometimes it was removing the last part of the URL depending on the values in URL and path request )

I had to extend the process and the operation and slightly modify them to make this work:

Custom.NewProcess1 Extends HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process

Custom.NewOperation1 Extends HS.FHIRServer.Interop.HTTPOperation

Hi Luis,

Thanks for your response.

1-Does that mean that the current built in process does not support the PUT/DELETE by default and I have to amend the code?

2-In regards to the identifier (id) for patient resources, I attempted to utilize the Medical Record Number (MRN) as the identifier. However, I observed that the FHIR server consistently assigns a different numerical value, potentially through an auto-incrementing mechanism. Does this imply that modifying this identifier is not permissible? Additionally, is it necessary to initiate a GET request to retrieve the resource identifier before executing a PUT request for updating patient information?

Thanks Luis, your documentation is rich and really helpful! 

I just thought that we might be able to use the built in process instead of re-writing all the code manually... When you say: define in the HS.FHIRServer.Interop.Request message the property.. Can you please clarify where I can do that? As I mentioned earlier I'm using  HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process.. Do you suggest to take a copy of it and amend it?

And even if I do that , this class only accept :  Ens.StreamContainer and  HS.Message.XMLMessage (The one I'm currently using, mentioned in my previous post)

And I noticed that this class has a block of code that handle the PUT method (but I couldn't find anything related to DELETE, and I don't really know how to access the PUT block as all the information are being filled automatically and I'm just passing the SDA message):

 

Another piece of code: 

Do you have any suggestion regarding that? Regarding handling DELETE and PUT methods? Or do you suggest to follow the documentation you provided earlier and write the code manually and disregard this process class?

Thanks for your response Evgeny.

2-"The data is stored in IRIS database, in global arrays - as any data other stored via InterSystems data products": Is there a Global  naming convention to access these data? 

3-  How can we access data in FHIR resources programmatically? Are there specific libraries provided by InterSystems for this purpose?

 I mean: Let's say I'm creating a new class in studio, to read  (GET) or to insert a resource (POST) or to update (PUT) a FHIR data resource.. How to do so using the code/object script studio 

4- Are there some examples of how to use these classes?

5-I'll be waiting for Patrick and Daniel feedbacks