Test98-HivInvalidCode
type: TestScript
node role: treeRoot
resource.id:
  value: Test98-HivInvalidCode
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: TestScript Test98-HivInvalidCode url: TestScript Test98HivInvalidCode version: 1.15.0 name: Test98HivInvalidCode status: Active date: 2026-08-12 07:05:53+0000 publisher: Federal Office of Public Health FOPH contact: Federal Office of Public Health FOPH: https://www.bag.admin.ch/bag/en/home/das-bag/kontakt-standort.html description: Test98: Verify that error for invalid hiv code is raised jurisdiction: Switzerland copyright: CC0-1.0 fixture id inputdata autocreate: false autodelete: false resource: Binary: application/fhir+xml (13796 bytes base64) test name: Test98 description: Test98: Verify that error for invalid hiv code is raised action Operations - Type Description ContentType EncodeRequestUrl Params SourceId * Test script operation code: validate ($validate) validate application/fhir+json true profile=http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict inputdata action Asserts - Description Direction ResponseCode WarningOnly * Confirm that the returned HTTP status is 200(OK). response 200 false action Asserts - Description Expression Value WarningOnly * Confirm that the returned resource is an OperationOutcome. is(FHIR.OperationOutcome) true false action Asserts - Description Expression Value WarningOnly * Confirm that we have errors. issue.where(severity='error' or severity='fatal').count()>0 true false action Asserts - Description Expression Value WarningOnly * Check Constraint failed: ch-elm-hiv-check issue.where(diagnostics.matches('Constraint failed: ch-elm-hiv-check')).count() > 0 true false
test script.url:
  value: http://fhir.ch/ig/ch-elm/TestScript/Test98-HivInvalidCode
test script.version:
  value: 1.15.0
test script.name:
  value: Test98HivInvalidCode
test script.status:
  value: active
test script.date:
  value: 2026-08-12T07:05:53+00:00
test script.publisher:
  value: Federal Office of Public Health FOPH
test script.contact:
  index: 0
  contact detail.name:
    value: Federal Office of Public Health FOPH
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: https://www.bag.admin.ch/bag/en/home/das-bag/kontakt-standort.html
test script.description:
  value: Test98: Verify that error for invalid hiv code is raised
test script.jurisdiction:
  index: 0
  codeable concept.coding:
    index: 0
    coding.system:
      value: urn:iso:std:iso:3166
    coding.code:
      value: CH
test script.copyright:
  value: CC0-1.0
test script.fixture:
  index: 0
  element.id:
    value: inputdata
  test script.fixture.autocreate:
    value: false
  test script.fixture.autodelete:
    value: false
  test script.fixture.resource:
    link: http://fhir.ch/ig/ch-elm/Binary/Test98-Bundle-HivInvalidCode
    reference.reference:
      value: Binary/Test98-Bundle-HivInvalidCode
test script.test:
  index: 0
  test script.test.name:
    value: Test98
  test script.test.description:
    value: Test98: Verify that error for invalid hiv code is raised
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.description:
        value: validate
      test script.setup.action.operation.content type:
        value: application/fhir+json
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: profile=http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict
      test script.setup.action.operation.source id:
        value: inputdata
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.description:
        value: Confirm that the returned HTTP status is 200(OK).
      test script.setup.action.assert.direction:
        value: response
      test script.setup.action.assert.response code:
        value: 200
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.description:
        value: Confirm that the returned resource is an OperationOutcome.
      test script.setup.action.assert.expression:
        value: is(FHIR.OperationOutcome)
      test script.setup.action.assert.value:
        value: true
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 3
    test script.test.action.assert:
      test script.setup.action.assert.description:
        value: Confirm that we have errors.
      test script.setup.action.assert.expression:
        value: issue.where(severity='error' or severity='fatal').count()>0
      test script.setup.action.assert.value:
        value: true
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 4
    test script.test.action.assert:
      test script.setup.action.assert.description:
        value: Check Constraint failed: ch-elm-hiv-check
      test script.setup.action.assert.expression:
        value: issue.where(diagnostics.matches('Constraint failed: ch-elm-hiv-check')).count() > 0
      test script.setup.action.assert.value:
        value: true
      test script.setup.action.assert.warning only:
        value: false

value: validate