medizininformatik-initiative / fdpg-plus

2 stars 0 forks source link

Extended referencedCriteria and Valueset Search #17

Open juliangruendner opened 3 months ago

juliangruendner commented 3 months ago

Overview

The UI, backend and ontology have to be extended to make the selected Concepts / or criteria for an attribute of a criterion searchable by valueSet / criteriaSet.

There are two type of searches that have to be distinguished.

  1. Searching for a criterion (including context) within a value set of criteria (referencedCriteria)
  2. Searching for a codeableConcept (without context) within a value set of codeableConcepts

1. Searching for a criterion as part of a value set

image

One criterion can be part of mulitple value sets. It is therefore necessary to extend each criterion with the additional information about the criteriaSets: ["http://fdpg.mii.cds/CriteriaSet/Diagnose/icd-10-gm"] and then add the referencedCriteriaSets to the ui profile as approppriate:

In profile:

"referenceCriteriaSets": 
[
    "http://fdpg.mii.cds/CriteriaSet/Diagnose/icd-10-gm",
    "http://sct.info"
]

In ES Input:

{
  "_index": "ontology",
  "_id": "88ae83ad-511d-37df-bf5e-c95c9224499d",
  "_version": 2,
  "_seq_no": 64465,
  "_primary_term": 2,
  "found": true,
  "_source": {
    "name": "Abnormer Blutdruckwert ohne Diagnose",
    "availability": 456,
    "terminology": "http://fhir.de/CodeSystem/bfarm/icd-10-gm",
    "termcode": "R03",
    "selectable": true,
    "context": {
      "code": "Diagnose",
      "display": "Diagnose",
      "system": "fdpg.mii.cds",
      "version": "1.0.0"
    },
    "termcodes": [
      {
        "code": "R03",
        "display": "Abnormer Blutdruckwert ohne Diagnose",
        "system": "http://fhir.de/CodeSystem/bfarm/icd-10-gm",
        "version": "2023"
      }
    ],
    "criteriaSets": [
        "http://fdpg.mii.cds/CriteriaSet/Diagnose/icd-10-gm",
        "http://fhir.de/CodeSystem/bfarm/icd-10-gm"
    ]
    "translations": [],
    "parents": [
      {
        "name": "Symptome, die das Kreislaufsystem und das Atmungssystem betreffen",
        "contextualized_termcode_hash": "6dba40ee-54d7-3875-853d-0ee96c9ea5ef"
      }
    ],
    "children": [
      {
        "name": "Erhöhter Blutdruckwert ohne Diagnose eines Bluthochdrucks",
        "contextualized_termcode_hash": "d20e003b-d3c4-3abd-9bae-375b6974f0f2"
      },
      {
        "name": "Unspezifischer niedriger Blutdruckwert",
        "contextualized_termcode_hash": "c61d6f59-6065-3dce-b85f-5d03998c6de5"
      }
    ],
    "related_terms": []
  }
}

in ES Search:

GET
/terminology/entry/search/?searchterm=Diabetes&criteriaSet=http://fdpg.mii.cds/CriteriaSet/Diagnose/icd-10-gm,http://fhir.de/CodeSystem/bfarm/icd-10-gm

criteriaSet is a param - keyword (exact match filter) and transparent for the user - only used internally and added automatically based on the attribute information from the ui profile

2. Searching for a codeableConcept (without context) within a value set of codeableConcepts

image

in profile:

{
    "allowedUnits": [],
    "attributeCode": {
        "code": "icd-o-3",
        "display": "icd-o-3",
        "system": "http://hl7.org/fhir/StructureDefinition",
        "version": null
    },
    "max": null,
    "min": null,
    "optional": true,
    "precision": 1,
    "referenceCriteriaSet": null,
    "referencedValueSet": "http://hl7.org/fhir/sid/icd-o-3",
    "type": "concept"
}

in ES input:

{
"valueSets": [
    "http://hl7.org/fhir/sid/icd-o-3"
]
"termcode": {
                    "code": "C76.2",
                    "display": "Abdomen o.n.A.",
                    "system": "http://hl7.org/fhir/sid/icd-o-3",
                    "version": "Erste_Revision"
}
}

in ES Search:

GET
/codeableConcept/entry/search/?searchterm=Diabetes&valueSet=http://hl7.org/fhir/sid/icd-o-3,http://second-value-set
Shayan1375 commented 3 months ago

General:


1. CodeableConcepts --> Reference

API Request:

GET /terminology/entry/search?criteriaSet=http://fdpg.mii.cds/CriteriaSet/Diagnose/icd-10-gm,http://fhir.de/CodeSystem/bfarm/icd-10-gm&searchterm=Diabetes

Response:

{
  "totalHits": 42,
  "results": [
    {
      "name": "Diabetes Mellitus",
      "id": "203e04cd-4f0a-321b-b1ad-9ec6d211e0a8",
      "availability": 119578,
      "context": "Diagnosis",
      "terminology": "icd-10",
      "termcode": "E10-E14",
      "kdsModule": "Condition",
      "selectable": true
    }
  ]
}

Internal Steps:

External Steps:


2. CodeableConcepts --> Searching ValueSets

API Request:

GET /codeableConcept/entry/search/?valueSet=http://hl7.org/fhir/sid/icd-o-3,http://second-value-set&searchterm=Diabetes

Response:

{
    "resultHits": 444,
    "results": [
        {
            "code": "",
            "display": "",
            "system": "",
            "version": ""
        }
    ]
}

Internal Steps:

External Steps:


juliangruendner commented 3 months ago

@michael-82 , @Shayan1375 , @thkoehler11 the necessary input from the ontology generator is part of the following issues: https://github.com/medizininformatik-initiative/fhir-ontology-generator/issues/37 https://github.com/medizininformatik-initiative/fhir-ontology-generator/issues/36 https://github.com/medizininformatik-initiative/fhir-ontology-generator/issues/35