cdisc-org / DataExchange-ODM

ODM repository
MIT License
8 stars 1 forks source link

on FHIR integration #59

Open DiTo97 opened 6 months ago

DiTo97 commented 6 months ago

Hello,

since in #58 we have already discussed how ODM v2.0 is not supported in the library yet, I will ask a few questions on the FHIR integration standard, starting from the examples, assuming that ODM v2.0 will be supported in the near future.

The examples I will mainly refer to are the following two:

I will split and group the questions in their own specific section:

multiple FHIR servers

In the FHIR example (line#27) a item group is defined specifying the external FHIR source (LOINC) for data retrieval, while in the data retrieval from FHIR in ODM example no such external FHIR source is specified in the study definition:

The last question is quite interesting since no example shows how to do it or if it is even possible.

formal expressions

Another key difference between the two examples is that the FHIR example specifies a code block using the FHIR client in python, while the data retrieval from FHIR example uses some kind of built-in query format with the context set to FHIR:

In the client code block it is assumed that the library has already been imported, while it says server settings would need context:

Also, the code block establishes a client connection with the server there, meaning that if oauth2 authentication was needed for a specific FHIR server we should likely handle the authentication workflow there, before instantiating the client:

As for the built-in query format case, I have similar concerns regarding authentication or having multiple FHIR sources.

Also, those method definitions assume the PATIENTID and BASE parameters to be passed to the method:

<MethodDef OID="MT.SNOMEDCT" Name="Method to retrieve the SNOMED-CT code of the Medical History Term">
  <Description><TranslatedText xml:lang="en" Type="text/plain">FHIR API call definition to retrieve Medical History SNOMED-CT code from FHIR 'Condition' resource</TranslatedText></Description>
  <MethodSignature>
    <Parameter Name="PATIENTID" Definition="Patient ID in the EHR system" DataType="text"/>
    <Parameter Name="BASE" Definition="Base (server address) of the FHIR EHR system" DataType="text"/>
    <ReturnValue Name="MHSNOMEDCT" Definition="Medical history SNOMED-CT code from the EHR system" DataType="text"/>
  </MethodSignature>
  <FormalExpression Context="FHIR">
    <Code>{BASE}//Condition?subject={PATIENTID}&amp;=format=xml/code/coding[system/@value='http://snomed.info/sct']/code/@value</Code>
  </FormalExpression>"
</MethodDef>

but when and where are those arguments injected in the method call?