hl7-be / pss

Prescription Search Support
Other
0 stars 0 forks source link

[Question - Technical] Call ServiceRequest to get GuidanceResponse not standard #16

Open NathanPeeters opened 6 months ago

NathanPeeters commented 6 months ago

The call ServiceRequest => GuidanceResponse isn't standard regarding FHIR as well as API standard. In fact, the initial call was to have a GuidanceRequest which lead to a guidanceResponse but FHIR didn't create a guidanceRequest yet.

=> To check with José what we can do about this issue. image

LionelCremer commented 5 months ago

Why doesn't PSS server expose a custom endpoint that could return a GuidanceResponse resource?

Here an example of steps:

  1. We could design an OperationDefinition on the implementation guide of PSS.

For example:

  "resourceType": "OperationDefinition",
  "id": "radiology-guidance-request",
  "url": "https://www.ehealth.fgov.be/standards/fhir/pss/OperationDefinition/radiology-guidance-request",
  "version": "1.0.0",
  "name": "RadiologyGuidanceRequest",
  "status": "active",
  "kind": "operation",
  "description": "Evaluates radioloy options based on patient details including age, gender, pregnancy status, and contrast allergy.",
  "code": "radiology-guidance-request",
  "parameter": [
    {
      "name": "age",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "Age of the patient",
      "type": "integer"
    },
    {
      "name": "gender",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "Gender of the patient",
      "type": "code"
    },
    {
      "name": "pregnancyStatus",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Pregnancy status, required if patient is female",
      "type": "boolean"
    },
    {
      "name": "contrastAllergy",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "Indicates if the patient has an allergy to contrast materials",
      "type": "boolean"
    }
  ],
  ...
}
  1. The PSS server can add this operation to his CapabilityStatement.

  2. The clients can request the following endpoint /RadiologyGuidanceRequest Example: POST /RadiologyGuidanceRequest

    {
    "resourceType": "Parameters",
    "parameter": [
    {
      "name": "age",
      "valueInteger": 34
    },
    {
      "name": "gender",
      "valueCode": "male"
    },
    {
      "name": "pregnancyStatus",
      "valueBoolean": false
    },
    {
      "name": "contrastAllergy",
      "valueBoolean": true
    },{
      "name": "indication",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "https://snomed.info/sct",
            "code": "25064002",
            "display": "Headache"
          },
          {
            "system": "http://hl7.org/fhir/sid/icd-10",
            "code": "R51",
            "display": "Headache"
          }
        ],
        "text": "Headache"
      }
    },
    {
      "name": "indication",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "https://snomed.info/sct",
            "code": "275277000",
            "display": "Post-traumatic amnesia"
          },
          {
            "system": "http://hl7.org/fhir/sid/icd-10",
            "code": "R41.3",
            "display": "Other amnesia"
          }
        ],
        "text": "Post-traumatic amnesia"
      }
    }
    ...
    ]
    }
  3. The PSS server reply with a GuidanceResponse.

Here is a sequence diagram to explain the interaction between the EDP, PSS an QSI: image

Here is a diagram to resume the proposed solution: PSS-FHIR-Structure-Page-1 drawio

This solution :

NathanPeeters commented 5 months ago

Possibility to be confirmed with José next week : Instead of sending a serviceRequest, Post a custom endpoint guidanceRequest (+ questionnaireResponse in payload) and reply with guidanceResponse.