{
  "resourceType": "StructureDefinition",
  "url": "https://electronichealth.se/fhir/shc/StructureDefinition/SHCSignedHealthCertificate",
  "version": "0.1",
  "name": "SHCSignedHealthCertificate",
  "status": "draft",
  "description": "This profile can be used to carry information about the signature of a health certificate, as well as the base 64 encoded document. The profile supports marking the document as signed (docStatus=Final) or unsigned (docStatus=Preliminary).",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.status",
        "path": "DocumentReference.status",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.docStatus",
        "path": "DocumentReference.docStatus",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type.coding",
        "path": "DocumentReference.type.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type.coding.system",
        "path": "DocumentReference.type.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type.coding.version",
        "path": "DocumentReference.type.coding.version",
        "fixedString": "http://snomed.info/sct/45991000052106",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type.coding.code",
        "path": "DocumentReference.type.coding.code",
        "min": 1,
        "fixedCode": "308707006",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://electronichealth.se/fhir/shc/StructureDefinition/SHCHealthCertificateSubject"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://electronichealth.se/fhir/shc/StructureDefinition/SHCPractitioner",
              "https://electronichealth.se/fhir/shc/StructureDefinition/SHCPractitionerRole"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.description",
        "path": "DocumentReference.description",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content",
        "path": "DocumentReference.content",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment",
        "path": "DocumentReference.content.attachment",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.data",
        "path": "DocumentReference.content.attachment.data",
        "short": "the actual document data",
        "comment": "Can be signed or unsigned, as marked by docStatus.\r\nThe base64 encoded XML or PDF file including the health certificate",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}