PackagesCanonicalsLogsProblems
    Packages
    fhir.erezept.validator@0.1.14
    https://example.org/fhir/TestScript/validate-e-rezept-ok
{
  "description": "Testet die Validierungsoperation $validate-e-rezept mit einem gültigen E-Rezept-Bundle.",
  "_filename": "Test_ValidateERezept_OK.json",
  "package_name": "fhir.erezept.validator",
  "date": null,
  "publisher": null,
  "name": "ValidateERezept_OK",
  "type": null,
  "experimental": null,
  "resourceType": "TestScript",
  "title": null,
  "package_version": "0.1.14",
  "status": "active",
  "id": "b6b0c8c8-3686-42e5-b890-41cb31007670",
  "kind": null,
  "url": "https://example.org/fhir/TestScript/validate-e-rezept-ok",
  "fixture": [ {
    "id": "validERezeptBundleExclAllergyIntolerance",
    "resource": {
      "id": "TEST-BUNDLE-1",
      "type": "transaction",
      "entry": [ {
        "fullUrl": "https://example.com/base/MedicationRequest/3123",
        "resource": {
          "id": "TEST-MEDICAL-REQUEST-1",
          "intent": "proposal",
          "status": "active",
          "subject": {
            "reference": "Patient/TEST-PATIENT-1"
          },
          "resourceType": "MedicationRequest",
          "medicationCodeableConcept": {
            "coding": [ {
              "code": "A10BA02",
              "system": "http://www.whocc.no/atc"
            } ]
          }
        }
      }, {
        "fullUrl": "https://example.com/base/Medication/example",
        "resource": {
          "id": "TEST-PATIENT-1",
          "name": [ {
            "use": "official",
            "family": "Chalmers"
          } ],
          "birthDate": "1974-12-25",
          "_birthDate": {
            "extension": [ {
              "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
              "valueDateTime": "1974-12-25T14:35:45-05:00"
            } ]
          },
          "resourceType": "Patient"
        }
      } ],
      "resourceType": "Bundle"
    },
    "autocreate": false,
    "autodelete": false
  }, {
    "id": "validERezeptBundleInclAllergyIntolerance",
    "resource": {
      "id": "TEST-BUNDLE-1",
      "type": "transaction",
      "entry": [ {
        "fullUrl": "https://example.com/base/MedicationRequest/3123",
        "resource": {
          "id": "TEST-MEDICAL-REQUEST-1",
          "intent": "proposal",
          "status": "active",
          "subject": {
            "reference": "Patient/TEST-PATIENT-1"
          },
          "resourceType": "MedicationRequest",
          "medicationCodeableConcept": {
            "coding": [ {
              "code": "A10BA02",
              "system": "http://www.whocc.no/atc"
            } ]
          }
        }
      }, {
        "fullUrl": "https://example.com/base/Medication/example",
        "resource": {
          "id": "TEST-PATIENT-1",
          "name": [ {
            "use": "official",
            "family": "Chalmers"
          } ],
          "birthDate": "1974-12-25",
          "_birthDate": {
            "extension": [ {
              "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
              "valueDateTime": "1974-12-25T14:35:45-05:00"
            } ]
          },
          "resourceType": "Patient"
        }
      }, {
        "fullUrl": "https://example.com/base/AllergyIntolerance/example",
        "resource": {
          "id": "TEST-ALLERGY-INTOLERANNCE-1",
          "code": {
            "coding": [ {
              "code": "A10BA03",
              "system": "http://www.whocc.no/atc"
            } ]
          },
          "patient": {
            "reference": "Patient/TEST-PATIENT-1"
          },
          "category": [ "medication" ],
          "resourceType": "AllergyIntolerance",
          "clinicalStatus": {
            "coding": [ {
              "code": "active",
              "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
              "display": "Active",
              "version": "1.0"
            } ]
          }
        }
      } ],
      "resourceType": "Bundle"
    },
    "autocreate": false,
    "autodelete": false
  } ],
  "version": null,
  "test": [ {
    "name": "Validiere gültiges E-Rezept-Bundle (ohne AllergyIntolerance)",
    "action": [ {
      "operation": {
        "type": {
          "code": "operation"
        },
        "accept": "json",
        "params": "$validate-e-rezept",
        "resource": null,
        "sourceId": "validERezeptBundleExclAllergyIntolerance",
        "contentType": "json",
        "description": "Führe $validate-e-rezept mit gültigem E-Rezept-Bundle (ohne AllergyIntolerance) aus"
      }
    }, {
      "assert": {
        "resource": "OperationOutcome",
        "response": "ok",
        "description": "Response ist ein OperationOutcome"
      }
    }, {
      "assert": {
        "path": "issue[0].severity",
        "value": "information",
        "operator": "equals",
        "description": "Issue Severity ist 'information'"
      }
    }, {
      "assert": {
        "path": "issue[0].code",
        "value": "information",
        "operator": "equals",
        "description": "Issue Code ist 'information'"
      }
    }, {
      "assert": {
        "path": "issue[0].details.text",
        "value": "OK",
        "operator": "equals",
        "description": "Details Text ist 'OK'"
      }
    } ]
  }, {
    "name": "Validiere gültiges E-Rezept-Bundle (mit AllergyIntolerance)",
    "action": [ {
      "operation": {
        "type": {
          "code": "operation"
        },
        "accept": "json",
        "params": "$validate-e-rezept",
        "resource": null,
        "sourceId": "validERezeptBundleInclAllergyIntolerance",
        "contentType": "json",
        "description": "Führe $validate-e-rezept mit gültigem E-Rezept-Bundle (mit AllergyIntolerance) aus"
      }
    }, {
      "assert": {
        "resource": "OperationOutcome",
        "response": "ok",
        "description": "Response ist ein OperationOutcome"
      }
    }, {
      "assert": {
        "path": "issue[0].severity",
        "value": "warning",
        "operator": "equals",
        "description": "Issue Severity ist 'warning'"
      }
    }, {
      "assert": {
        "path": "issue[0].code",
        "value": "business-rule",
        "operator": "equals",
        "description": "Issue Code ist 'business-rule'"
      }
    }, {
      "assert": {
        "path": "issue[0].details.text",
        "value": "Patient hat Allergie gegen verschriebenes Medikament. ATC Code: ",
        "operator": "equals",
        "description": "Details Text abgleich"
      }
    } ]
  } ]
}