{
"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": "TestScript-testscript-example-readcommon.json",
"package_name": "hl7.fhir.r6.examples",
"date": "2024-04-24",
"variable": [ {
"name": "PatientResourceId1",
"defaultValue": "f001"
}, {
"name": "PatientResourceId2",
"defaultValue": "f002"
} ],
"publisher": "HL7 International / FHIR Infrastructure",
"jurisdiction": [ {
"coding": [ {
"code": "US",
"system": "urn:iso:std:iso:3166",
"display": "United States of America"
} ]
} ],
"purpose": "Patient Read Operation",
"name": "TestScript Example Read Common",
"copyright": "© HL7.org 2011+",
"type": null,
"experimental": "true",
"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": null,
"package_version": "6.0.0-ballot3",
"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."
} ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode": "fhir"
} ],
"status": "draft",
"id": "26fa5774-7a01-4d83-922c-7cf156444212",
"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": [ {
"telecom": [ {
"value": "http://www.hl7.org/Special/committees/fiwg",
"system": "url"
} ]
} ],
"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" ]
}