{
"description": "TestScript example resource showing the use of the common element to reuse actions within the test element. Each test will perform a Patient read operation utilizing user defined dynamic variables that will hold the Patient resource id values.",
"_filename": "example/TestScript-testscript-example-readcommon.json",
"package_name": "hl7.fhir.uv.testing",
"date": "2024-04-24",
"variable": [ {
"name": "PatientResourceId1",
"defaultValue": "f001"
}, {
"name": "PatientResourceId2",
"defaultValue": "f002"
} ],
"publisher": "HL7 International / FHIR Infrastructure",
"purpose": "Patient Read Operation",
"resourceDefinition": "http://hl7.org/fhir/StructureDefinition/TestScript|0.1.0-snapshot1",
"name": "TestScriptExampleReadCommon",
"copyright": "© HL7.org 2011+",
"type": null,
"experimental": "false",
"resourceType": "TestScript",
"scope": [ {
"phase": {
"coding": [ {
"code": "unit",
"system": "http://hl7.org/fhir/testscript-scope-phase-codes"
} ]
},
"artifact": "http://hl7.org/fhir/StructureDefinition/Patient",
"conformance": {
"coding": [ {
"code": "optional",
"system": "http://hl7.org/fhir/testscript-scope-conformance-codes"
} ]
}
} ],
"title": "TestScript Example Read Common",
"_profile": [ {
"id": "patient-profile"
} ],
"package_version": "0.1.0-snapshot1",
"common": [ {
"key": "CommonReadActionAsserts",
"name": "Common Read Action Asserts",
"action": [ {
"assert": {
"response": "okay",
"description": "Confirm that the returned HTTP status is 200(OK).",
"warningOnly": false,
"stopTestOnFail": false
}
}, {
"assert": {
"contentType": "xml",
"description": "Confirm that the returned format is XML.",
"warningOnly": false,
"stopTestOnFail": false
}
}, {
"assert": {
"operator": "notEmpty",
"description": "Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server might not support versioning.",
"headerField": "Last-Modified",
"warningOnly": true,
"stopTestOnFail": false
}
}, {
"assert": {
"resource": "Patient",
"description": "Confirm that the returned resource type is Patient.",
"warningOnly": false,
"stopTestOnFail": false
}
}, {
"assert": {
"description": "Confirm that the returned Patient conforms to the base FHIR specification.",
"warningOnly": false,
"stopTestOnFail": false,
"validateProfileId": "patient-profile"
}
} ],
"description": "The common action asserts to evaluate and validate conformance to the base FHIR read operation."
} ],
"status": "draft",
"id": "9657ad54-8de6-492b-bd31-6d5507106342",
"kind": null,
"url": "http://hl7.org/fhir/TestScript/testscript-example-readcommon",
"identifier": [ {
"value": "urn:oid:2.16.840.1.113883.4.642.12.8",
"system": "urn:ietf:rfc:3986"
} ],
"version": "1.0",
"contact": [ {
"name": "Support",
"telecom": [ {
"use": "work",
"value": "support@HL7.org",
"system": "email"
} ]
} ],
"test": [ {
"id": "PatientRead1",
"name": "Patient Read Test 1",
"action": [ {
"operation": {
"type": {
"code": "read",
"system": "http://hl7.org/fhir/restful-interaction"
},
"accept": "xml",
"params": "/${PatientResourceId1}",
"resource": "Patient",
"description": "Read the known Patient resource on the destination test system using the user defined dynamic variable ${PatientResourceId1}.",
"encodeRequestUrl": true
}
}, {
"common": {
"keyRef": "CommonReadActionAsserts"
}
} ],
"description": "Read a known Patient (default id 'f001') and validate response using common action asserts."
}, {
"id": "PatientRead2",
"name": "Patient Read Test 2",
"action": [ {
"operation": {
"type": {
"code": "read",
"system": "http://hl7.org/fhir/restful-interaction"
},
"accept": "xml",
"params": "/${PatientResourceId2}",
"resource": "Patient",
"description": "Read the known Patient resource on the destination test system using the user defined dynamic variable ${PatientResourceId2}.",
"encodeRequestUrl": true
}
}, {
"common": {
"keyRef": "CommonReadActionAsserts"
}
} ],
"description": "Read a known Patient (default id 'f002') and validate response using common action asserts."
} ],
"profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ]
}