Touchstone FHIR Testing
2.0.0 - current
Touchstone FHIR Testing v2.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions
Active as of 2023-07-03 |
Generated Narrative: TestScript
Resource TestScript "ndjson-assertion-prefix"
url: http://touchstone.aegis.net/touchstone/fhir/testing/TestScript/ndjson-assertion-prefix
version: 2.0.0
name: NDJSONAssertionPrefixSyntax
title: Demonstrate NDJSON Assertion Prefix Syntax
status: active
date: 2023-07-03
publisher: AEGIS.net, Inc.
contact: AEGIS.net, Inc.: https://www.aegis.net, Richard Ettema: mailto:richard.ettema@aegis.net
description: Demonstrate NDJSON Assertion Prefix Syntax
jurisdiction: World (m49.htm#001)
copyright: (c) AEGIS.net, Inc. 2015+
destination
id
Serverindex: 1
profile: FHIR Server (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types code FHIR-Server = 'FHIR Server', stated as 'null')
profile:
{.name[?(@.family=='Gracia')]}http://hl7.org/fhir/StructureDefinition/Patient
Name | DefaultValue |
outputBaseUrl | http://localhost:33000/bulk-api/output |
test
id
AssertContentTypeResourceAndValidationname: AssertContentTypeResourceAndValidation
description: Demonstrates contentType, resource and validateProfile assertions with no filters.
action
Operations
Type Description Accept Destination EncodeRequestUrl Url get (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code get = 'get', stated as 'null') Request BulkData ndjson 1 true ${outputBaseUrl}/1/Patient.ndjson action
Asserts
Extension Description Direction HeaderField Operator Value WarningOnly Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'. request Accept contains ndjson false action
Asserts
Extension Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is 200. response equals 200 false action
Asserts
Extension Direction ContentType WarningOnly response ndjson false action
Asserts
Extension Direction Resource WarningOnly response Patient false action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Validate that the returned resource conforms to the corresponding FHIR resource profile. response resource-profile false
test
id
AssertResourceTypename: AssertResourceType
description: Demonstrates resource assertions.
action
Operations
Type Description Accept Destination EncodeRequestUrl Url get (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code get = 'get', stated as 'null') Retrieve invalid NDJSON that contains mix of Patient and Person resource types. ndjson 1 true ${outputBaseUrl}/2/patient-person-mix.ndjson action
Asserts
Extension Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is 200. response equals 200 false action
Asserts
Extension Description Direction Resource WarningOnly <resource value="Patient"/> response Patient false
test
id
AssertResourceCountname: AssertResourceCount
description: Demonstrates resource-count assertions (only works with NDJSON responses).
action
Operations
Type Description Accept Destination EncodeRequestUrl Url get (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code get = 'get', stated as 'null') Retrieve NDJSON response that contains 5 Patient resources. ndjson 1 true ${outputBaseUrl}/1/Patient.ndjson action
Asserts
Extension Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is 200. response equals 200 false action
Asserts
Description Direction Operator Path Value WarningOnly <path value="resource-count"/> <operator value="equals"/> <value value="5"/> response equals resource-count 5 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="resource-count"/> <operator value="equals"/> <value value="6"/> response equals resource-count 6 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="resource-count"/> <operator value="greaterThan"/> <value value="4"/> response greaterThan resource-count 4 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner}resource-count"/> <operator value="greaterThan"/> <value value="4"/> response greaterThan {generalPractitioner}resource-count 4 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count"/> <operator value="greaterThan"/> <value value="4"/> response greaterThan {generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count 4 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count"/> <operator value="equals"/> <value value="1"/> response equals {generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count 1 false
test
id
AssertPathname: AssertPath
description: Demonstrates path assertions.
action
Operations
Type Description Accept Destination EncodeRequestUrl Url get (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code get = 'get', stated as 'null') Retrieve NDJSON response that contains 5 Patient resources. ndjson 1 true ${outputBaseUrl}/1/Patient.ndjson action
Asserts
Extension Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is 200. response equals 200 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="generalPractitioner.reference"/> <operator value="contains"/> <value value="Practitioner/"/> response contains generalPractitioner.reference Practitioner/ false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="generalPractitioner.reference"/> <operator value="equals"/> <value value="Practitioner/2"/> response equals generalPractitioner.reference Practitioner/2 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{any}generalPractitioner.reference"/> <operator value="equals"/> <value value="Practitioner/2"/> response equals {any}generalPractitioner.reference Practitioner/2 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{2}generalPractitioner.reference"/> <operator value="equals"/> <value value="Practitioner/2"/> response equals {2}generalPractitioner.reference Practitioner/2 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{3}generalPractitioner.reference"/> <operator value="equals"/> <value value="Practitioner/2"/> response equals {3}generalPractitioner.reference Practitioner/2 false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{2-5}generalPractitioner.reference"/> <operator value="contains"/> <value value="Practitioner/"/> response contains {2-5}generalPractitioner.reference Practitioner/ false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{2-100}generalPractitioner.reference"/> <operator value="contains"/> <value value="Practitioner/"/> response contains {2-100}generalPractitioner.reference Practitioner/ false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{6-100}generalPractitioner.reference"/> <operator value="contains"/> <value value="Practitioner/"/> response contains {6-100}generalPractitioner.reference Practitioner/ false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family"/> <operator value="equals"/> <value value="Allen"/> response equals {generalPractitioner[?(@.reference=='Practitioner/3')]}name.family Allen false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family"/> <operator value="equals"/> <value value="Gracia"/> response equals {generalPractitioner[?(@.reference=='Practitioner/3')]}name.family Gracia false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner}name.family"/> <operator value="in"/> <value value="Gracia,McKay,Allen,Williams,Hill"/> response in {generalPractitioner}name.family Gracia,McKay,Allen,Williams,Hill false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner}name.family"/> <operator value="in"/> <value value="a,b,c,d,e"/> response in {generalPractitioner}name.family a,b,c,d,e false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{generalPractitioner}name.family"/> <operator value="in"/> <value value="a,b,Allen,d,e"/> response in {generalPractitioner}name.family a,b,Allen,d,e false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{any|generalPractitioner}name.family"/> <operator value="in"/> <value value="a,b,Allen,d,e"/> response in {any|generalPractitioner}name.family a,b,Allen,d,e false action
Asserts
Extension Description Direction Operator Path Value WarningOnly <path value="{any|generalPractiXXXXXXXXXXXXXioner}name.family"/> <operator value="in"/> <value value="a,b,Allen,d,e"/> response in {any|generalPractiXXXXXXXXXXXXXioner}name.family a,b,Allen,d,e false
test
id
AssertFhirPathname: AssertFhirPath
description: Demonstrates expression assertions.
action
Operations
Type Description Accept Destination EncodeRequestUrl Url get (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code get = 'get', stated as 'null') Retrieve NDJSON response that contains 5 Patient resources. ndjson 1 true ${outputBaseUrl}/1/Patient.ndjson action
Asserts
Extension Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is 200. response equals 200 false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="Patient.name.family"/> <operator value="in"/> <value value="Allen,Gracia"/> response Patient.name.family in Allen,Gracia false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{any}Patient.name.family"/> <operator value="in"/> <value value="Allen,Gracia"/> response {any}Patient.name.family in Allen,Gracia false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{all}Patient.name.family"/> <operator value="equals"/> <value value="Allen"/> response {all}Patient.name.family equals Allen false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{1-3}Patient.name.family"/> <operator value="in"/> <value value="McKay,Gracia,Allen"/> response {1-3}Patient.name.family in McKay,Gracia,Allen false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{1-100}Patient.name.family"/> <operator value="in"/> <value value="McKay,Gracia,Allen"/> response {1-100}Patient.name.family in McKay,Gracia,Allen false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="Patient.name.given"/> <operator value="in"/> <value value="Joshua,P"/> response Patient.name.given in Joshua,P false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{any}Patient.name.given"/> <operator value="equals"/> <value value="George"/> response {any}Patient.name.given equals George false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{1-3}Patient.name.given"/> <operator value="in"/> <value value="Brian,Q,George,Carol,G"/> response {1-3}Patient.name.given in Brian,Q,George,Carol,G false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{1-100}Patient.name.given"/> <operator value="in"/> <value value="Brian,Q,George,Carol,G"/> response {1-100}Patient.name.given in Brian,Q,George,Carol,G false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{1-100}Patient.name.given"/> <operator value="in"/> <value value="Brian,Q,George,Carol,G,Joshua,H,P"/> response {1-100}Patient.name.given in Brian,Q,George,Carol,G,Joshua,H,P false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{.name[?(@.family=='Allen')]}Patient.name.given"/> <operator value="in"/> <value value="Carol,G"/> response {.name[?(@.family=='Allen')]}Patient.name.given in Carol,G false action
Asserts
Extension Description Direction Expression Operator Value WarningOnly <expression value="{.name[?(@.family=='McKay')]}Patient.name.given"/> <operator value="equals"/> <value value="George"/> response {.name[?(@.family=='McKay')]}Patient.name.given equals George false action
Asserts
Extension Description Direction Expression WarningOnly <expression value="Patient.name.where(family='Gracia')"/> response Patient.name.where(family='Gracia') false action
Asserts
Extension Description Direction Expression WarningOnly <expression value="{any}Patient.name.where(family='Gracia')"/> response {any}Patient.name.where(family='Gracia') false
test
id
AssertProfileValidationname: AssertProfileValidation
description: Demonstrates validateProfileId assertions.
action
Operations
Type Description Accept Destination EncodeRequestUrl Url get (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code get = 'get', stated as 'null') Retrieve NDJSON response that contains 5 Patient resources. Some of the resources are invalid (will fail AEGIS Validator validation) ndjson 1 true ${outputBaseUrl}/3/patient-some-invalid.ndjson action
Asserts
Extension Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is 200. response equals 200 false action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Validate that the returned resource conforms to the corresponding FHIR resource profile. response resource-profile false action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Validate that the returned resource conforms to the corresponding FHIR resource profile. response resource-profile-for-any false action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Validate that the returned resource conforms to the corresponding FHIR resource profile. response resource-profile-for-first false action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Validate that the returned resource conforms to the corresponding FHIR resource profile. response resource-profile-for-Gracia false