medizininformatik-initiative / feasibility-backend

Backend of the feasibility-gui.
Apache License 2.0
2 stars 5 forks source link

Create value set endpoint to check termcode intersection #192

Closed juliangruendner closed 11 months ago

juliangruendner commented 11 months ago

To check whether a list of criteria (defined by their termcode and context) are part of a value set, a value set endpoint should be created that calculates the intersect of all values in a value set and a list of criteria.

The criteria are defined by the combination of context and termcode and are send to the backend as uuidv3 hash as follows:

Concatenated string of (context.system, context.code, context.version, termcode.system, termcode.code, termcode.version), omitting null values for version and without any delimiters.

Endpoint:

Endpoint Call: POST .../terminology/value-set/intersect?url={criteriaSetUrl}

Body:

["contexTermcodeHash1","contextTermcodeHash2",....,"contextTermcodehashN"]

RESPONSE

["contexTermcodeHash1","contextTermcodeHash2",....,"contextTermcodehashN"]

Additional Information:

Use in UI This endpoint will be called from the UI to check wether a number of criteria are part of a value set. The information of the value set will be provided to the UI via the respective valueDefinition or attributeDefinition of the respective ui_profile of the parent criterion. The value set to be compared against is specified through the field: "referenceValueSet"

Example attributeDefinition of the Specimen ui_profile:

{
    "attributeDefinitions": [
        {
            "attributeCode": {
                "code": "festgestellteDiagnose",
                "display": "Festgestellte Diagnose",
                "system": "http://hl7.org/fhir/StructureDefinition"
            },
            "optional": true,
            "precision": 1,
            "referenceValueSet": "http://fhir.de/ValueSet/bfarm/icd-10-gm",
            "type": "reference"
        }
....
michael-82 commented 11 months ago

the name value_set was replaced by criteria_set

michael-82 commented 11 months ago

Closed by #191