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

FHIR IG analytics

Packagedk.ehmi.eds.testscripts
Resource TypeTestScript
IdTestScript-Server-2RESTInterfaceTestsjson.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/medcomdk/dk-ehmi-eds-testscripts/TestScript-Server-2RESTInterfaceTestsjson.html
URLhttp://medcomehmi.dk/ig/edstestscripts/Server-2RESTInterfaceTestsjson
Version0.1.0
Statusactive
Date2025-08-18
NameServer-2RESTInterfaceTestsjson
Realmdk
CopyrightMedCom 2025

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 Server-2RESTInterfaceTestsjson

Profile: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript

url: TestScript Server-2RESTInterfaceTestsjson

version: 0.1.0

name: Server-2RESTInterfaceTestsjson

status: Aktiv

date: 2025-08-18

publisher: MedCom

contact: MedCom: https://medcom.dk,ehmi@medcom.dk

jurisdiction: Denmark

copyright:

MedCom 2025

Origins

-IndexProfile
*1Test script profile origin type: FHIR-Client (FHIR Client)

Destinations

-IndexProfile
*1Test script profile destination type: FHIR-Server (FHIR Server)

profile: http://hl7.org/fhir/StructureDefinition/CapabilityStatement

test

id

Disallow updates, patches & deletions to AuditEvents

name: Disallow-actions-for-AuditEvents

description: Ensure that the EDS Server Component disallows updates, patches & deletions to AuditEvent resources

action

Operations

-TypeDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*testscript-operation-codes-extended: metadata (metadata)Retrieve the server's CapabilityStatementjsonjson1false1metadata

action

Asserts

-DescriptionDirectionResponseCodeWarningOnly
*Ensure the HTTP status is 200(OK)response200false

action

Asserts

-DescriptionDirectionResourceWarningOnly
*Ensure the resource type is CapabilityStatementresponseCapabilityStatementfalse

action

Asserts

-DescriptionDirectionValidateProfileIdWarningOnly
*Ensure that the returned CapabilityStatement is validresponsecapabilities-profilefalse

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the HAPI FHIR version is atleast 8.2responsesoftware.version.substring(0,3).toDecimal()greaterThan8.1false

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure that updates, patches & deletions to AuditEvent resources are disallowedresponserest.resource.where(type = 'AuditEvent').interaction.where(code = 'update' or code = 'patch' or code = 'delete').count()equals0false

Source1

{
  "resourceType": "TestScript",
  "id": "Server-2RESTInterfaceTestsjson",
  "meta": {
    "profile": [
      "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"
    ]
  },
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://medcomehmi.dk/ig/edstestscripts/Server-2RESTInterfaceTestsjson",
  "version": "0.1.0",
  "name": "Server-2RESTInterfaceTestsjson",
  "status": "active",
  "date": "2025-08-18",
  "publisher": "MedCom",
  "contact": [
    {
      "name": "MedCom",
      "telecom": [
        {
          "system": "url",
          "value": "https://medcom.dk"
        },
        {
          "system": "email",
          "value": "ehmi@medcom.dk"
        }
      ]
    }
  ],
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "DK",
          "display": "Denmark"
        }
      ]
    }
  ],
  "copyright": "MedCom 2025",
  "origin": [
    {
      "index": 1,
      "profile": {
        "system": "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types",
        "code": "FHIR-Client"
      }
    }
  ],
  "destination": [
    {
      "index": 1,
      "profile": {
        "system": "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types",
        "code": "FHIR-Server"
      }
    }
  ],
  "profile": [
    {
      "id": "capabilities-profile",
      "reference": "http://hl7.org/fhir/StructureDefinition/CapabilityStatement"
    }
  ],
  "test": [
    {
      "id": "Disallow updates, patches & deletions to AuditEvents",
      "name": "Disallow-actions-for-AuditEvents",
      "description": "Ensure that the EDS Server Component disallows updates, patches & deletions to AuditEvent resources",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://touchstone.com/fhir/testscript-operation-codes-extended",
              "code": "metadata"
            },
            "description": "Retrieve the server's CapabilityStatement",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": false,
            "origin": 1,
            "params": "metadata"
          }
        },
        {
          "assert": {
            "description": "Ensure the HTTP status is 200(OK)",
            "direction": "response",
            "responseCode": "200",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Ensure the resource type is CapabilityStatement",
            "direction": "response",
            "resource": "CapabilityStatement",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Ensure that the returned CapabilityStatement is valid",
            "direction": "response",
            "validateProfileId": "capabilities-profile",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Ensure the HAPI FHIR version is atleast 8.2",
            "direction": "response",
            "expression": "software.version.substring(0,3).toDecimal()",
            "operator": "greaterThan",
            "value": "8.1",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Ensure that updates, patches & deletions to AuditEvent resources are disallowed",
            "direction": "response",
            "expression": "rest.resource.where(type = 'AuditEvent').interaction.where(code = 'update' or code = 'patch' or code = 'delete').count()",
            "operator": "equals",
            "value": "0",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}