medizininformatik-initiative / sq2cql

1 stars 1 forks source link

Add an Integration Test with the following CCDL #129

Open alexanderkiel opened 2 months ago

alexanderkiel commented 2 months ago

CCDL:

{
  "version": http://to_be_decided.com/draft-1/schema#,
  "display": "",
  "inclusionCriteria": [
    [
      {
        "termCodes": [
          {
            "code": "119373006",
            "system": http://snomed.info/sct,
            "version": http://snomed.info/sct/900000000000207008/version/20240501,
            "display": "Amniotic fluid specimen"
          }
        ],
        "attributeFilters": [
          {
            "criteria": [
              {
                "termCodes": [
                  {
                    "code": "C50",
                    "system": http://fhir.de/CodeSystem/bfarm/icd-10-gm,
                    "version": "2024",
                    "display": "Bösartige Neubildung der Brustdrüse [Mamma]"
                  }
                ],
                "context": {
                  "code": "Diagnose",
                  "system": "fdpg.mii.cds",
                  "version": "1.0.0",
                  "display": "Diagnose"
                }
              },
              {
                "termCodes": [
                  {
                    "code": "I15",
                    "system": http://fhir.de/CodeSystem/bfarm/icd-10-gm,
                    "version": "2024",
                    "display": "Sekundäre Hypertonie"
                  }
                ],
                "context": {
                  "code": "Diagnose",
                  "system": "fdpg.mii.cds",
                  "version": "1.0.0",
                  "display": "Diagnose"
                }
              }
            ],
            "type": "reference",
            "attributeCode": {
              "code": "festgestellteDiagnose",
              "display": "Festgestellte Diagnose",
              "system": http://hl7.org/fhir/StructureDefinition
            }
          },
          {
            "selectedConcepts": [
              {
                "code": "C21",
                "display": "Analkanal und Anus",
                "system": http://hl7.org/fhir/sid/icd-o-3
              },
              {
                "code": "C24.1",
                "display": "Ampulla Vateri",
                "system": http://hl7.org/fhir/sid/icd-o-3
              },
              {
                "code": "C67.9",
                "display": "Blase o.n.A.",
                "system": http://hl7.org/fhir/sid/icd-o-3
              }
            ],
            "type": "concept",
            "attributeCode": {
              "code": "icd-o-3",
              "display": "icd-o-3",
              "system": http://hl7.org/fhir/StructureDefinition
            }
          }
        ],
        "context": {
          "code": "Specimen",
          "system": "fdpg.mii.cds",
          "version": "1.0.0",
          "display": "Bioprobe"
        },
        "timeRestriction": {
          "afterDate": "2024-06-10",
          "beforeDate": "2024-06-26"
        }
      }
    ]
  ]
}

Also generate some test data so that at least one patient will be found.