{
  "resourceType": "StructureDefinition",
  "id": "TestReport",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Specialized.Quality Reporting &amp; Testing"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 0
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "business"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "fhir"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": ".status = entered-in-error"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/TestReport",
  "version": "4.6.0",
  "name": "TestReport",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00:00",
  "publisher": "Health Level Seven International (FHIR Infrastructure)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm"
        }
      ]
    }
  ],
  "description": "A summary of information based on the results of executing a TestScript.",
  "fhirVersion": "4.6.0",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "objimpl",
      "uri": "http://hl7.org/fhir/object-implementation",
      "name": "Object Implementation Information"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "TestReport",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "TestReport",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "200,150"
          }
        ],
        "path": "TestReport",
        "short": "Describes the results of a TestScript execution",
        "definition": "A summary of information based on the results of executing a TestScript.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "objimpl",
            "map": "BaseConformance"
          },
          {
            "identity": "w5",
            "map": "conformance.misc"
          }
        ]
      },
      {
        "id": "TestReport.identifier",
        "path": "TestReport.identifier",
        "short": "External identifier",
        "definition": "Identifier for the TestScript assigned for external purposes outside the context of FHIR.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          }
        ]
      },
      {
        "id": "TestReport.name",
        "path": "TestReport.name",
        "short": "Informal name of the executed TestScript",
        "definition": "A free text natural language name identifying the executed TestScript.",
        "comment": "Not expected to be globally unique.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "objimpl",
            "map": "BaseConformance.name"
          }
        ]
      },
      {
        "id": "TestReport.status",
        "path": "TestReport.status",
        "short": "completed | in-progress | waiting | stopped | entered-in-error",
        "definition": "The current state of this test report.",
        "comment": "The status represents where the execution is currently within the test script execution life cycle.\n\nThis element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TestReportStatus"
            },
            {
              "url": "http://hl7.org/fhir/build/StructureDefinition/definition",
              "valueString": "The current status of the test report."
            }
          ],
          "strength": "required",
          "description": "The current status of the test script execution.",
          "valueSet": "http://hl7.org/fhir/ValueSet/report-status-codes"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.status"
          }
        ]
      },
      {
        "id": "TestReport.testScript",
        "path": "TestReport.testScript",
        "short": "Reference to the  version-specific TestScript that was executed to produce this TestReport",
        "definition": "Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/TestScript"
            ]
          }
        ],
        "isSummary": true
      },
      {
        "id": "TestReport.result",
        "path": "TestReport.result",
        "short": "pass | fail | pending",
        "definition": "The overall result from the execution of the TestScript.",
        "comment": "The pass and fail result represents a completed test script execution. The pending result represents a test script execution that has not yet started or is currently in progress.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TestReportResult"
            },
            {
              "url": "http://hl7.org/fhir/build/StructureDefinition/definition",
              "valueString": "The reported execution result."
            }
          ],
          "strength": "required",
          "description": "The overall execution result of the TestScript.",
          "valueSet": "http://hl7.org/fhir/ValueSet/report-result-codes"
        }
      },
      {
        "id": "TestReport.score",
        "path": "TestReport.score",
        "short": "The final score (percentage of tests passed) resulting from the execution of the TestScript",
        "definition": "The final score (percentage of tests passed) resulting from the execution of the TestScript.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "decimal"
          }
        ],
        "isSummary": true
      },
      {
        "id": "TestReport.tester",
        "path": "TestReport.tester",
        "short": "Name of the tester producing this report (Organization or individual)",
        "definition": "Name of the tester producing this report (Organization or individual).",
        "comment": "Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context.",
        "requirements": "Helps establish the \"authority/credibility\" of the TestReport.  May also allow for contact.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true
      },
      {
        "id": "TestReport.issued",
        "path": "TestReport.issued",
        "short": "When the TestScript was executed and this TestReport was generated",
        "definition": "When the TestScript was executed and this TestReport was generated.",
        "comment": "Additional specific dates may be added as extensions.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.recorded"
          },
          {
            "identity": "objimpl",
            "map": "BaseConformance.date"
          }
        ]
      },
      {
        "id": "TestReport.participant",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "500,150"
          }
        ],
        "path": "TestReport.participant",
        "short": "A participant in the test execution, either the execution engine, a client, or a server",
        "definition": "A participant in the test execution, either the execution engine, a client, or a server.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.participant.type",
        "path": "TestReport.participant.type",
        "short": "test-engine | client | server",
        "definition": "The type of participant.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TestReportParticipantType"
            }
          ],
          "strength": "required",
          "description": "The type of participant.",
          "valueSet": "http://hl7.org/fhir/ValueSet/report-participant-type"
        }
      },
      {
        "id": "TestReport.participant.uri",
        "path": "TestReport.participant.uri",
        "short": "The uri of the participant. An absolute URL is preferred",
        "definition": "The uri of the participant. An absolute URL is preferred.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ]
      },
      {
        "id": "TestReport.participant.display",
        "path": "TestReport.participant.display",
        "short": "The display name of the participant",
        "definition": "The display name of the participant.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "TestReport.setup",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "30,240"
          }
        ],
        "path": "TestReport.setup",
        "short": "The results of the series of required setup operations before the tests were executed",
        "definition": "The results of the series of required setup operations before the tests were executed.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.setup.action",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "SetupAction"
          },
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "50,380"
          }
        ],
        "path": "TestReport.setup.action",
        "short": "A setup operation or assert that was executed",
        "definition": "Action would contain either an operation or an assertion.",
        "comment": "An action should contain either an operation or an assertion but not both.  It can contain any number of variables.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "inv-1",
            "severity": "error",
            "human": "Setup action SHALL contain either an operation or assert but not both.",
            "expression": "operation.exists() xor assert.exists()",
            "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)",
            "source": "http://hl7.org/fhir/StructureDefinition/TestReport"
          }
        ]
      },
      {
        "id": "TestReport.setup.action.operation",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "280,480"
          }
        ],
        "path": "TestReport.setup.action.operation",
        "short": "The operation to perform",
        "definition": "The operation performed.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.setup.action.operation.result",
        "path": "TestReport.setup.action.operation.result",
        "short": "pass | skip | fail | warning | error",
        "definition": "The result of this operation.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TestReportActionResult"
            },
            {
              "url": "http://hl7.org/fhir/build/StructureDefinition/definition",
              "valueString": "The results of executing an action."
            }
          ],
          "strength": "required",
          "description": "The result of the execution of an individual action.",
          "valueSet": "http://hl7.org/fhir/ValueSet/report-action-result-codes"
        }
      },
      {
        "id": "TestReport.setup.action.operation.message",
        "path": "TestReport.setup.action.operation.message",
        "short": "A message associated with the result",
        "definition": "An explanatory message associated with the result.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "markdown"
          }
        ]
      },
      {
        "id": "TestReport.setup.action.operation.detail",
        "path": "TestReport.setup.action.operation.detail",
        "short": "A link to further details on the result",
        "definition": "A link to further details on the result.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ]
      },
      {
        "id": "TestReport.setup.action.assert",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "0,480"
          }
        ],
        "path": "TestReport.setup.action.assert",
        "short": "The assertion to perform",
        "definition": "The results of the assertion performed on the previous operations.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.setup.action.assert.result",
        "path": "TestReport.setup.action.assert.result",
        "short": "pass | skip | fail | warning | error",
        "definition": "The result of this assertion.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TestReportActionResult"
            },
            {
              "url": "http://hl7.org/fhir/build/StructureDefinition/definition",
              "valueString": "The results of executing an action."
            }
          ],
          "strength": "required",
          "description": "The result of the execution of an individual action.",
          "valueSet": "http://hl7.org/fhir/ValueSet/report-action-result-codes"
        }
      },
      {
        "id": "TestReport.setup.action.assert.message",
        "path": "TestReport.setup.action.assert.message",
        "short": "A message associated with the result",
        "definition": "An explanatory message associated with the result.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "markdown"
          }
        ]
      },
      {
        "id": "TestReport.setup.action.assert.detail",
        "path": "TestReport.setup.action.assert.detail",
        "short": "A link to further details on the result",
        "definition": "A link to further details on the result.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "TestReport.test",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "580,270"
          }
        ],
        "path": "TestReport.test",
        "short": "A test executed from the test script",
        "definition": "A test executed from the test script.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.test.name",
        "path": "TestReport.test.name",
        "short": "Tracking/logging name of this test",
        "definition": "The name of this test used for tracking/logging purposes by test engines.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "TestReport.test.description",
        "path": "TestReport.test.description",
        "short": "Tracking/reporting short description of the test",
        "definition": "A short description of the test used by test engines for tracking and reporting purposes.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "TestReport.test.action",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "TestAction"
          },
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "450,380"
          }
        ],
        "path": "TestReport.test.action",
        "short": "A test operation or assert that was performed",
        "definition": "Action would contain either an operation or an assertion.",
        "comment": "An action should contain either an operation or an assertion but not both.  It can contain any number of variables.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "inv-2",
            "severity": "error",
            "human": "Test action SHALL contain either an operation or assert but not both.",
            "expression": "operation.exists() xor assert.exists()",
            "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)",
            "source": "http://hl7.org/fhir/StructureDefinition/TestReport"
          }
        ]
      },
      {
        "id": "TestReport.test.action.operation",
        "path": "TestReport.test.action.operation",
        "short": "The operation performed",
        "definition": "An operation would involve a REST request to a server.",
        "min": 0,
        "max": "1",
        "contentReference": "#TestReport.setup.action.operation"
      },
      {
        "id": "TestReport.test.action.assert",
        "path": "TestReport.test.action.assert",
        "short": "The assertion performed",
        "definition": "The results of the assertion performed on the previous operations.",
        "min": 0,
        "max": "1",
        "contentReference": "#TestReport.setup.action.assert"
      },
      {
        "id": "TestReport.teardown",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "70,290"
          }
        ],
        "path": "TestReport.teardown",
        "short": "The results of running the series of required clean up steps",
        "definition": "The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.teardown.action",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "TeardownAction"
          },
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "200,380"
          }
        ],
        "path": "TestReport.teardown.action",
        "short": "One or more teardown operations performed",
        "definition": "The teardown action will only contain an operation.",
        "comment": "An action should contain either an operation or an assertion but not both.  It can contain any number of variables.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "TestReport.teardown.action.operation",
        "path": "TestReport.teardown.action.operation",
        "short": "The teardown operation performed",
        "definition": "An operation would involve a REST request to a server.",
        "min": 1,
        "max": "1",
        "contentReference": "#TestReport.setup.action.operation"
      }
    ]
  }
}