FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagehl7.fhir.uv.testing
Resource TypeTestScript
IdTestScript-testscript-example-multisystem.json
FHIR VersionR6
Sourcehttps://build.fhir.org/ig/HL7/fhir-testing-ig/TestScript-testscript-example-multisystem.html
URLhttp://hl7.org/fhir/TestScript/testscript-example-multisystem
Version1.0
Statusdraft
Date2017-01-18
NameTestScriptExampleMultiSystem
TitleMultisystem Test Script
Realmuv
Authorityhl7
DescriptionTestScript example resource showing use of origin and destination for multisystem support. The single origin will execute a Patient read against the two destination systems using user defined dynamic variables. The test engine will wait at each operation action with a defined origin and destination for the origin test system to send the expected FHIR operation to the destination test system. Once the expected request and response is observed, the test engine will continue with the test execution.
PurposePatient Read Operation
Copyright© HL7.org 2011+

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: TestScript testscript-example-multisystem

Language: en

url: http://hl7.org/fhir/TestScript/testscript-example-multisystem

identifier: Uniform Resource Identifier (URI)/urn:oid:2.16.840.1.113883.4.642.12.6

version: 1.0

name: TestScriptExampleMultiSystem

title: Multisystem Test Script

status: Draft

experimental: false

date: 2017-01-18

publisher: HL7 International / FHIR Infrastructure

contact: Support: support@HL7.org

description:

TestScript example resource showing use of origin and destination for multisystem support. The single origin will execute a Patient read against the two destination systems using user defined dynamic variables. The test engine will wait at each operation action with a defined origin and destination for the origin test system to send the expected FHIR operation to the destination test system. Once the expected request and response is observed, the test engine will continue with the test execution.

purpose:

Patient Read Operation

copyright:

© HL7.org 2011+

testSystem

index: 1

title: FHIR Client

description:

The FHIR Client system under test.

testSystem

index: 2

title: FHIR Server

description:

The FHIR Server system under test.

url: http://acme.com/fhir/test

metadata

Links

-UrlDescription
*http://example.org/fhir/patient.htmlDemographics and other administrative information about an individual or animal receiving care or other health-related services.

capability

required: true

validated: false

description: Patient Read Operation

origin: 1

destination: 2

link: http://example.org/fhir/http.html#read

capabilities: http://example.org/fhir/CapabilityStatement/example

capability

required: true

validated: false

description: Patient Read Operation

origin: 1

destination: 2

link: http://example.org/fhir/http.html#read

capabilities: http://example.org/fhir/CapabilityStatement/example

variable

name: Dest1PatientResourceId

defaultValue: example

variable

name: Dest2PatientResourceId

defaultValue: example

test

id

01-ReadPatient-Destination1

name: ReadPatient-Destination1

description: Read a Patient from the first destination test system using the user defined dynamic variable ${Dest1PatientResourceId}. Perform basic validation.

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParamsRequestId
*FHIR Restful Interactions: read (read)http://hl7.org/fhir/StructureDefinition/PatientRead a Patient from the first destination test system and perform basic validation.xmlxml1true1/${Dest1PatientResourceId}request-read-patient-01

action

Asserts

-DescriptionRequestMethodStopTestOnFailWarningOnly
*Confirm that the request method GET was sent by the client system under test.GETfalsefalse

action

Asserts

-DescriptionDirectionHeaderFieldOperatorStopTestOnFailValueWarningOnly
*Confirm that the client requested an Accept of xml.requestAcceptcontainsfalsexmlfalse

action

Asserts

-DescriptionDirectionResponseStopTestOnFailWarningOnly
*Confirm that the returned HTTP status is 200(OK).responseOKfalsefalse

action

Asserts

-DescriptionDirectionContentTypeStopTestOnFailWarningOnly
*Confirm that the returned format is XML.responsexmlfalsefalse

action

Asserts

-DescriptionDirectionResourceStopTestOnFailWarningOnly
*Confirm that the returned resource type is Patient.responsehttp://hl7.org/fhir/StructureDefinition/Patientfalsefalse

test

id

02-ReadPatient-Destination2

name: ReadPatient-Destination2

description: Read a Patient from the second destination test system using the user defined dynamic variable ${Dest2PatientResourceId}. Perform basic validation.

action

operation

type: FHIR Restful Interactions: read (read)

resource: http://hl7.org/fhir/StructureDefinition/Patient

description: Read a Patient from the second destination test system and perform basic validation.

accept: xml

contentType: xml

destination: 2

encodeRequestUrl: true

origin: 1

params: /${Dest2PatientResourceId}

RequestHeaders

-FieldValue
*Accept-Charsetutf-8

action

Asserts

-DescriptionDirectionHeaderFieldOperatorStopTestOnFailValueWarningOnly
*Confirm that the client requested an Accept of xml.requestAcceptcontainsfalsexmlfalse

action

Asserts

-DescriptionDirectionResponseStopTestOnFailWarningOnly
*Confirm that the returned HTTP status is 200(OK).responseOKfalsefalse

action

Asserts

-DescriptionDirectionContentTypeStopTestOnFailWarningOnly
*Confirm that the returned format is XML.responsexmlfalsefalse

action

Asserts

-DescriptionDirectionResourceStopTestOnFailWarningOnly
*Confirm that the returned resource type is Patient.responsehttp://hl7.org/fhir/StructureDefinition/Patientfalsefalse

Source1

{
  "resourceType": "TestScript",
  "resourceDefinition": "http://hl7.org/fhir/StructureDefinition/TestScript|0.1.0-SNAPSHOT",
  "id": "testscript-example-multisystem",
  "language": "en",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://hl7.org/fhir/TestScript/testscript-example-multisystem",
  "identifier": [
    {
      "system": "urn:ietf:rfc:3986",
      "value": "urn:oid:2.16.840.1.113883.4.642.12.6"
    }
  ],
  "version": "1.0",
  "name": "TestScriptExampleMultiSystem",
  "title": "Multisystem Test Script",
  "status": "draft",
  "experimental": false,
  "date": "2017-01-18",
  "publisher": "HL7 International / FHIR Infrastructure",
  "contact": [
    {
      "name": "Support",
      "telecom": [
        {
          "system": "email",
          "value": "support@HL7.org",
          "use": "work"
        }
      ]
    }
  ],
  "description": "TestScript example resource showing use of origin and destination for multisystem support. The single origin will execute a Patient read against the two destination systems using user defined dynamic variables. The test engine will wait at each operation action with a defined origin and destination for the origin test system to send the expected FHIR operation to the destination test system. Once the expected request and response is observed, the test engine will continue with the test execution.",
  "purpose": "Patient Read Operation",
  "copyright": "© HL7.org 2011+",
  "testSystem": [
    {
      "index": 1,
      "title": "FHIR Client",
      "description": "The FHIR Client system under test."
    },
    {
      "index": 2,
      "title": "FHIR Server",
      "description": "The FHIR Server system under test.",
      "url": "http://acme.com/fhir/test"
    }
  ],
  "metadata": {
    "link": [
      {
        "url": "http://example.org/fhir/patient.html",
        "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services."
      }
    ],
    "capability": [
      {
        "required": true,
        "validated": false,
        "description": "Patient Read Operation",
        "origin": [
          1
        ],
        "destination": 2,
        "link": [
          "http://example.org/fhir/http.html#read"
        ],
        "capabilities": "http://example.org/fhir/CapabilityStatement/example"
      },
      {
        "required": true,
        "validated": false,
        "description": "Patient Read Operation",
        "origin": [
          1
        ],
        "destination": 2,
        "link": [
          "http://example.org/fhir/http.html#read"
        ],
        "capabilities": "http://example.org/fhir/CapabilityStatement/example"
      }
    ]
  },
  "variable": [
    {
      "name": "Dest1PatientResourceId",
      "defaultValue": "example"
    },
    {
      "name": "Dest2PatientResourceId",
      "defaultValue": "example"
    }
  ],
  "test": [
    {
      "id": "01-ReadPatient-Destination1",
      "name": "ReadPatient-Destination1",
      "description": "Read a Patient from the first destination test system using the user defined dynamic variable ${Dest1PatientResourceId}. Perform basic validation.",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://hl7.org/fhir/restful-interaction",
              "code": "read"
            },
            "resource": "Patient",
            "description": "Read a Patient from the first destination test system and perform basic validation.",
            "accept": "xml",
            "contentType": "xml",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "/${Dest1PatientResourceId}",
            "requestId": "request-read-patient-01"
          }
        },
        {
          "assert": {
            "description": "Confirm that the request method GET was sent by the client system under test.",
            "requestMethod": "get",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the client requested an Accept of xml.",
            "direction": "request",
            "headerField": "Accept",
            "operator": "contains",
            "stopTestOnFail": false,
            "value": "xml",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the returned HTTP status is 200(OK).",
            "direction": "response",
            "response": "okay",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the returned format is XML.",
            "direction": "response",
            "contentType": "xml",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the returned resource type is Patient.",
            "direction": "response",
            "resource": "Patient",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "02-ReadPatient-Destination2",
      "name": "ReadPatient-Destination2",
      "description": "Read a Patient from the second destination test system using the user defined dynamic variable ${Dest2PatientResourceId}. Perform basic validation.",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://hl7.org/fhir/restful-interaction",
              "code": "read"
            },
            "resource": "Patient",
            "description": "Read a Patient from the second destination test system and perform basic validation.",
            "accept": "xml",
            "contentType": "xml",
            "destination": 2,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "/${Dest2PatientResourceId}",
            "requestHeader": [
              {
                "field": "Accept-Charset",
                "value": "utf-8"
              }
            ]
          }
        },
        {
          "assert": {
            "description": "Confirm that the client requested an Accept of xml.",
            "direction": "request",
            "headerField": "Accept",
            "operator": "contains",
            "stopTestOnFail": false,
            "value": "xml",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the returned HTTP status is 200(OK).",
            "direction": "response",
            "response": "okay",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the returned format is XML.",
            "direction": "response",
            "contentType": "xml",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Confirm that the returned resource type is Patient.",
            "direction": "response",
            "resource": "Patient",
            "stopTestOnFail": false,
            "warningOnly": false
          }
        }
      ]
    }
  ]
}