PackagesCanonicalsLogsProblems
    Packages
    medcom.fhir.dk.carecommunication@4.0.0
    http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication
{
  "description": "Care related communication between two or more parties in Danish healthcare",
  "_filename": "StructureDefinition-medcom-careCommunication-communication.json",
  "package_name": "medcom.fhir.dk.carecommunication",
  "date": "2024-06-28T11:24:18+02:00",
  "derivation": "constraint",
  "publisher": "MedCom",
  "fhirVersion": "4.0.1",
  "jurisdiction": [ {
    "coding": [ {
      "code": "DK",
      "system": "urn:iso:std:iso:3166",
      "display": "Denmark"
    } ]
  } ],
  "name": "MedComCareCommunication",
  "mapping": [ {
    "uri": "http://hl7.org/fhir/workflow",
    "name": "Workflow Pattern",
    "identity": "workflow"
  }, {
    "uri": "http://hl7.org/fhir/fivews",
    "name": "FiveWs Pattern Mapping",
    "identity": "w5"
  }, {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  } ],
  "abstract": false,
  "type": "Communication",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "4.0.0",
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "dom-2",
        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        "xpath": "not(parent::f:contained and f:contained)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.contained.empty()"
      }, {
        "key": "dom-3",
        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
        "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()"
      }, {
        "key": "dom-4",
        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"
      }, {
        "key": "dom-5",
        "human": "If a resource is contained in another resource, it SHALL NOT have a security label",
        "xpath": "not(exists(f:contained/*/f:meta/f:security))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.security.empty()"
      }, {
        "key": "dom-6",
        "human": "A resource should have narrative for robust management",
        "xpath": "exists(f:text/h:div)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "warning",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
          "valueBoolean": true
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation",
          "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
        } ],
        "expression": "text.`div`.exists()"
      }, {
        "key": "medcom-careCommunication-5",
        "human": "Priority must not be present when Communication.category is other than 'regarding-referral'",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "where(category.coding.code != 'regarding-referral').priority.empty()"
      }, {
        "key": "medcom-careCommunication-6",
        "human": "There shall exist a Communication.topic when Communication.category = 'other'",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "iif(category.coding.code != 'other', true, category.coding.code = 'other' and topic.exists())"
      }, {
        "key": "medcom-careCommunication-7",
        "human": "There shall exist a practitioner role when using a PractitionerRole as author in a message segment.",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "payload.where(extension('http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension').exists()).extension.value.reference.resolve().code.coding.code.exists()"
      }, {
        "key": "medcom-careCommunication-8",
        "human": "There shall exist a practitioner name when using a Practitioner as author in a message segment.",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "payload.where(extension('http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension').exists()).extension.value.reference.resolve().practitioner.resolve().name.exists()"
      }, {
        "key": "medcom-careCommunication-9",
        "human": "An episodeOfCare-identifier must be included when an Encounter instance is included.",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "iif(encounter.exists().not(), true, encounter.reference.resolve().episodeOfCare.identifier.exists())"
      } ],
      "path": "Communication",
      "min": 0,
      "definition": "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.",
      "isModifier": false,
      "short": "A record of information transmitted from a sender to a receiver",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "Event",
        "identity": "workflow"
      } ],
      "max": "*",
      "id": "Communication",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication"
      },
      "isSummary": false
    }, {
      "path": "Communication.id",
      "min": 0,
      "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "isModifier": false,
      "short": "Logical id of this artifact",
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "id"
        } ]
      } ],
      "max": "1",
      "id": "Communication.id",
      "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.id"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.meta",
      "min": 0,
      "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
      "isModifier": false,
      "short": "Metadata about the resource",
      "type": [ {
        "code": "Meta"
      } ],
      "max": "1",
      "id": "Communication.meta",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.meta"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.implicitRules",
      "min": 0,
      "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
      "isModifier": true,
      "short": "A set of rules under which this content was created",
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Communication.implicitRules",
      "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.implicitRules"
      },
      "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.language",
      "min": 0,
      "definition": "The base language in which the resource is written.",
      "isModifier": false,
      "short": "Language of the resource content",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "preferred",
        "valueSet": "http://hl7.org/fhir/ValueSet/languages",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Language"
        } ],
        "description": "A human language."
      },
      "max": "1",
      "id": "Communication.language",
      "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.language"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.text",
      "min": 0,
      "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
      "isModifier": false,
      "short": "Text summary of the resource, for human interpretation",
      "mapping": [ {
        "map": "Act.text?",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Narrative"
      } ],
      "alias": [ "narrative", "html", "xhtml", "display" ],
      "max": "1",
      "id": "Communication.text",
      "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DomainResource.text"
      },
      "isSummary": false
    }, {
      "path": "Communication.contained",
      "min": 0,
      "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
      "isModifier": false,
      "short": "Contained, inline Resources",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Resource"
      } ],
      "alias": [ "inline resources", "anonymous resources", "contained resources" ],
      "max": "*",
      "id": "Communication.contained",
      "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.contained"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.extension",
      "min": 0,
      "definition": "An Extension",
      "isModifier": false,
      "short": "Extension",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "max": "*",
      "id": "Communication.extension",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.extension",
      "min": 0,
      "definition": "Reference to a more specfic sender of a message.",
      "isModifier": false,
      "short": "SenderExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-sender-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "sender",
      "max": "1",
      "id": "Communication.extension:sender",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Communication.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "medcom-uuidv4",
        "human": "The value shall correspond to the structure of an UUID version 4",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "value.matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')"
      } ],
      "path": "Communication.identifier",
      "requirements": "Allows identification of the communication as it is known by various participating systems and in a way that remains consistent across servers.",
      "min": 1,
      "definition": "Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server.",
      "isModifier": false,
      "short": "The communication identifier",
      "mapping": [ {
        "map": "Event.identifier",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.identifier",
      "comment": "This is a business identifier, not a resource identifier (see [discussion](http://hl7.org/fhir/R4/resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.identifier"
      },
      "isSummary": true
    }, {
      "path": "Communication.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.identifier.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Communication.identifier.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "1",
      "id": "Communication.identifier.use",
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 0,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "isModifier": false,
      "short": "Description of identifier",
      "mapping": [ {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "1",
      "id": "Communication.identifier.type",
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 0,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "isModifier": false,
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Communication.identifier.system",
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "isModifier": false,
      "short": "The value that is unique",
      "mapping": [ {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.identifier.value",
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "isModifier": false,
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "1",
      "id": "Communication.identifier.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "isModifier": false,
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "1",
      "id": "Communication.identifier.assigner",
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.instantiatesCanonical",
      "min": 0,
      "definition": "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.",
      "isModifier": false,
      "short": "Instantiates FHIR protocol or definition",
      "mapping": [ {
        "map": "Event.instantiatesCanonical",
        "identity": "workflow"
      }, {
        "map": ".outboundRelationship[typeCode=DEFN].target",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "canonical",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ActivityDefinition", "http://hl7.org/fhir/StructureDefinition/Measure", "http://hl7.org/fhir/StructureDefinition/OperationDefinition", "http://hl7.org/fhir/StructureDefinition/Questionnaire" ]
      } ],
      "max": "*",
      "id": "Communication.instantiatesCanonical",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.instantiatesCanonical"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.instantiatesUri",
      "min": 0,
      "definition": "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.",
      "isModifier": false,
      "short": "Instantiates external protocol or definition",
      "mapping": [ {
        "map": "Event.instantiatesUri",
        "identity": "workflow"
      }, {
        "map": ".outboundRelationship[typeCode=DEFN].target",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "*",
      "id": "Communication.instantiatesUri",
      "comment": "This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.instantiatesUri"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.basedOn",
      "min": 0,
      "definition": "An order, proposal or plan fulfilled in whole or in part by this Communication.",
      "isModifier": false,
      "short": "Request fulfilled by this communication",
      "mapping": [ {
        "map": "Event.basedOn",
        "identity": "workflow"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "alias": [ "fulfills" ],
      "max": "*",
      "id": "Communication.basedOn",
      "comment": "This must point to some sort of a 'Request' resource, such as CarePlan, CommunicationRequest, ServiceRequest, MedicationRequest, etc.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.basedOn"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.partOf",
      "min": 0,
      "definition": "Part of this action.",
      "isModifier": false,
      "short": "Part of this action",
      "mapping": [ {
        "map": "Event.partOf",
        "identity": "workflow"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "alias": [ "container" ],
      "max": "*",
      "id": "Communication.partOf",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.partOf"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.inResponseTo",
      "min": 0,
      "definition": "Prior communication that this communication is in response to.",
      "isModifier": false,
      "short": "Reply to",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Communication" ]
      } ],
      "max": "*",
      "id": "Communication.inResponseTo",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.inResponseTo"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.status",
      "min": 1,
      "definition": "The status of the transmission.",
      "isModifier": true,
      "short": "preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown",
      "mapping": [ {
        "map": "Event.status",
        "identity": "workflow"
      }, {
        "map": "FiveWs.status",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "patternCode": "unknown",
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/event-status|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "CommunicationStatus"
        } ],
        "description": "The status of the communication."
      },
      "max": "1",
      "id": "Communication.status",
      "comment": "This element is labeled as a modifier because the status contains the codes aborted and entered-in-error that mark the communication as not currently valid.",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Communication.status"
      },
      "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
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.statusReason",
      "min": 0,
      "definition": "Captures the reason for the current state of the Communication.",
      "isModifier": false,
      "short": "Reason for current status",
      "mapping": [ {
        "map": "Event.statusReason",
        "identity": "workflow"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/communication-not-done-reason",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "CommunicationNotDoneReason"
        } ],
        "description": "Codes for the reason why a communication did not happen."
      },
      "alias": [ "Suspended Reason", "Cancelled Reason" ],
      "max": "1",
      "id": "Communication.statusReason",
      "comment": "This is generally only used for \"exception\" statuses such as \"not-done\", \"suspended\" or \"aborted\". The reason for performing the event at all is captured in reasonCode, not here.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.statusReason"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category",
      "min": 1,
      "definition": "The type of message conveyed such as alert, notification, reminder, instruction, etc.",
      "isModifier": false,
      "short": "The category (Danish: kategori) describes the overall content of the message.",
      "mapping": [ {
        "map": "FiveWs.class",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "http://medcomfhir.dk/ig/terminology/ValueSet/medcom-careCommunication-categories"
      },
      "max": "1",
      "id": "Communication.category",
      "comment": "There may be multiple axes of categorization and one communication may serve multiple purposes.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.category"
      },
      "isSummary": false
    }, {
      "path": "Communication.category.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.category.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.category.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Communication.category.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "Communication.category.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "path": "Communication.category.coding.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.category.coding.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.category.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Communication.category.coding.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "isModifier": false,
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.category.coding.system",
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "isModifier": false,
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Communication.category.coding.version",
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "isModifier": false,
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.category.coding.code",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "isModifier": false,
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Communication.category.coding.display",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
      "isModifier": false,
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "Communication.category.coding.userSelected",
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.category.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Communication.category.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.priority",
      "min": 0,
      "definition": "Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.",
      "isModifier": false,
      "short": "Shall be present if the message priority is known to be ASAP, but is only allowed when the category is 'regarding referral', see medcom-careCommunication-5",
      "mapping": [ {
        "map": "FiveWs.grade",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "meaningWhenMissing": "If missing, this communication should be treated with normal priority",
      "binding": {
        "strength": "required",
        "valueSet": "http://medcomfhir.dk/ig/terminology/ValueSet/medcom-careCommunication-requestPriority"
      },
      "max": "1",
      "id": "Communication.priority",
      "comment": "Used to prioritize workflow (such as which communication to read first) when the communication is planned or in progress.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.priority"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.medium",
      "min": 0,
      "definition": "A channel that was used for this communication (e.g. email, fax).",
      "isModifier": false,
      "short": "A channel of communication",
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://terminology.hl7.org/ValueSet/v3-ParticipationMode",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "CommunicationMedium"
        } ],
        "description": "Codes for communication mediums such as phone, fax, email, in person, etc."
      },
      "max": "*",
      "id": "Communication.medium",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.medium"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.subject",
      "min": 1,
      "definition": "The patient or group that was the focus of this communication.",
      "isModifier": false,
      "short": "Focus of message",
      "mapping": [ {
        "map": "Event.subject",
        "identity": "workflow"
      }, {
        "map": "FiveWs.subject[x]",
        "identity": "w5"
      }, {
        "map": "FiveWs.subject",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "aggregation": [ "bundled" ],
        "targetProfile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-patient" ]
      } ],
      "mustSupport": true,
      "alias": [ "patient" ],
      "max": "1",
      "id": "Communication.subject",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.subject"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.topic",
      "min": 0,
      "definition": "Description of the purpose/content, similar to a subject line in an email.",
      "isModifier": false,
      "short": "The topic (Danish: emne) may be added as a supplement to the category. Topic must be added in the text-element.",
      "mapping": [ {
        "map": "FiveWs.context",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/communication-topic",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "CommunicationTopic"
        } ],
        "description": "Codes describing the purpose or content of the communication."
      },
      "max": "1",
      "id": "Communication.topic",
      "comment": "Communication.topic.text can be used without any codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.topic"
      },
      "isSummary": false
    }, {
      "path": "Communication.topic.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.topic.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.topic.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Communication.topic.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.topic.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "Communication.topic.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.topic.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 1,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Communication.topic.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.about",
      "min": 0,
      "definition": "Other resources that pertain to this communication and to which this communication should be associated.",
      "isModifier": false,
      "short": "Resources that pertain to this communication",
      "mapping": [ {
        "map": "FiveWs.context",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "max": "*",
      "id": "Communication.about",
      "comment": "Don't use Communication.about element when a more specific element exists, such as basedOn or reasonReference.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.about"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.encounter",
      "min": 0,
      "definition": "The Encounter during which this Communication was created or to which the creation of this record is tightly associated.",
      "isModifier": false,
      "short": "Shall contain a reference to an Encounter resource with a episodeOfCare-identifier, if the identifier is included in a previous message.",
      "mapping": [ {
        "map": "Event.context",
        "identity": "workflow"
      }, {
        "map": "FiveWs.context",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "aggregation": [ "bundled" ],
        "targetProfile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-encounter" ]
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.encounter",
      "comment": "This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.encounter"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.sent",
      "min": 0,
      "definition": "The time when this communication was sent.",
      "isModifier": false,
      "short": "When sent",
      "mapping": [ {
        "map": "Event.occurrence[x] {Invariant: maps to period.start}",
        "identity": "workflow"
      }, {
        "map": "FiveWs.done[x]",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "Communication.sent",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.sent"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.received",
      "min": 0,
      "definition": "The time when this communication arrived at the destination.",
      "isModifier": false,
      "short": "When received",
      "mapping": [ {
        "map": "Event.occurrence[x] {Invariant: maps to period.end}",
        "identity": "workflow"
      }, {
        "map": "FiveWs.done[x]",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "Communication.received",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.received"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.recipient",
      "min": 0,
      "definition": "The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time).",
      "isModifier": false,
      "short": "Describes a more specific receiver than the MessageHeader.destination.reciever, called a recipient. It may be a careteam a homecare group in the municipality or a named general practitioner.",
      "mapping": [ {
        "map": "Event.performer.actor",
        "identity": "workflow"
      }, {
        "map": "FiveWs.actor",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "aggregation": [ "bundled" ],
        "targetProfile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitionerrole", "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-careteam" ]
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "Communication.recipient",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.recipient"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.sender",
      "min": 0,
      "definition": "The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.",
      "isModifier": false,
      "short": "Message sender",
      "mapping": [ {
        "map": "Event.performer.actor",
        "identity": "workflow"
      }, {
        "map": "FiveWs.actor",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/HealthcareService" ]
      } ],
      "max": "1",
      "id": "Communication.sender",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Communication.sender"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.reasonCode",
      "min": 0,
      "definition": "The reason or justification for the communication.",
      "isModifier": false,
      "short": "Indication for message",
      "mapping": [ {
        "map": "Event.reasonCode",
        "identity": "workflow"
      }, {
        "map": "FiveWs.why[x]",
        "identity": "w5"
      }, {
        "map": ".reasonCode",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/clinical-findings",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "CommunicationReason"
        } ],
        "description": "Codes for describing reasons for the occurrence of a communication."
      },
      "max": "*",
      "id": "Communication.reasonCode",
      "comment": "Textual reasons can be captured using reasonCode.text.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.reasonCode"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.reasonReference",
      "min": 0,
      "definition": "Indicates another resource whose existence justifies this communication.",
      "isModifier": false,
      "short": "Why was communication done?",
      "mapping": [ {
        "map": "Event.reasonReference",
        "identity": "workflow"
      }, {
        "map": "FiveWs.why[x]",
        "identity": "w5"
      }, {
        "map": ".outboundRelationship[typeCode=RSON].target",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Condition", "http://hl7.org/fhir/StructureDefinition/Observation", "http://hl7.org/fhir/StructureDefinition/DiagnosticReport", "http://hl7.org/fhir/StructureDefinition/DocumentReference" ]
      } ],
      "max": "*",
      "id": "Communication.reasonReference",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.reasonReference"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload",
      "min": 1,
      "definition": "Text, attachment(s), or resource(s) that was communicated to the recipient.",
      "isModifier": false,
      "short": "Each payload corresponds to a message segment with a message text or an attachment. At least one payload with a message text shall be included.",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "$this.content",
          "type": "type"
        } ]
      },
      "type": [ {
        "code": "BackboneElement"
      } ],
      "max": "*",
      "id": "Communication.payload",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.payload"
      },
      "isSummary": false
    }, {
      "path": "Communication.payload.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.payload.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "An Extension",
      "isModifier": false,
      "short": "Extension",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "max": "*",
      "id": "Communication.payload.extension",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "Date and time of this payload",
      "isModifier": false,
      "short": "DateTimeExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-datetime-extension" ]
      } ],
      "sliceName": "date",
      "max": "1",
      "id": "Communication.payload.extension:date",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "Reference to a PractitionerRole and subsequent Practitioner",
      "isModifier": false,
      "short": "PractitionerExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension" ]
      } ],
      "sliceName": "author",
      "max": "1",
      "id": "Communication.payload.extension:author",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "Extension that contains the contact information",
      "isModifier": false,
      "short": "ContactExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-contact-extension" ]
      } ],
      "sliceName": "authorContact",
      "max": "1",
      "id": "Communication.payload.extension:authorContact",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "An extension holding a specific identifier datatype",
      "isModifier": false,
      "short": "IdentifierExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-identifier-extension" ]
      } ],
      "sliceName": "identifier",
      "max": "1",
      "id": "Communication.payload.extension:identifier",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Communication.payload.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x]",
      "min": 1,
      "definition": "A communicated content (or for multi-part communications, one portion of the communication).",
      "isModifier": false,
      "short": "Message part content",
      "type": [ {
        "code": "string"
      }, {
        "code": "Attachment"
      }, {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "max": "1",
      "id": "Communication.payload.content[x]",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Communication.payload.content[x]"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload",
      "min": 1,
      "definition": "Text, attachment(s), or resource(s) that was communicated to the recipient.",
      "isModifier": false,
      "short": "Message payload",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "mustSupport": true,
      "sliceName": "string",
      "max": "*",
      "id": "Communication.payload:string",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.payload"
      },
      "isSummary": false
    }, {
      "path": "Communication.payload.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.payload:string.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 4,
      "definition": "An Extension",
      "isModifier": false,
      "short": "Extension",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "max": "*",
      "id": "Communication.payload:string.extension",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 1,
      "definition": "Date and time of this payload",
      "isModifier": false,
      "short": "DateTimeExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-datetime-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "date",
      "max": "1",
      "id": "Communication.payload:string.extension:date",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 1,
      "definition": "Reference to a PractitionerRole and subsequent Practitioner",
      "isModifier": false,
      "short": "PractitionerExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "author",
      "max": "1",
      "id": "Communication.payload:string.extension:author",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 1,
      "definition": "Extension that contains the contact information",
      "isModifier": false,
      "short": "ContactExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-contact-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "authorContact",
      "max": "1",
      "id": "Communication.payload:string.extension:authorContact",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 1,
      "definition": "An extension holding a specific identifier datatype",
      "isModifier": false,
      "short": "IdentifierExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-identifier-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "identifier",
      "max": "1",
      "id": "Communication.payload:string.extension:identifier",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Communication.payload:string.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x]",
      "min": 1,
      "definition": "A communicated content (or for multi-part communications, one portion of the communication).",
      "isModifier": false,
      "short": "Message part content",
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.payload:string.content[x]",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Communication.payload.content[x]"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload",
      "min": 0,
      "definition": "Text, attachment(s), or resource(s) that was communicated to the recipient.",
      "isModifier": false,
      "short": "The payload with an attachment shall contain a link or content attached to the message.",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "mustSupport": true,
      "sliceName": "attachment",
      "max": "*",
      "id": "Communication.payload:attachment",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.payload"
      },
      "isSummary": false
    }, {
      "path": "Communication.payload.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.payload:attachment.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 2,
      "definition": "An Extension",
      "isModifier": false,
      "short": "Extension",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "max": "*",
      "id": "Communication.payload:attachment.extension",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 1,
      "definition": "Date and time of this payload",
      "isModifier": false,
      "short": "DateTimeExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-datetime-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "date",
      "max": "1",
      "id": "Communication.payload:attachment.extension:date",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "Reference to a PractitionerRole and subsequent Practitioner",
      "isModifier": false,
      "short": "PractitionerExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "author",
      "max": "1",
      "id": "Communication.payload:attachment.extension:author",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 0,
      "definition": "Extension that contains the contact information",
      "isModifier": false,
      "short": "ContactExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-contact-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "authorContact",
      "max": "1",
      "id": "Communication.payload:attachment.extension:authorContact",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.extension",
      "min": 1,
      "definition": "An extension holding a specific identifier datatype",
      "isModifier": false,
      "short": "IdentifierExtension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-identifier-extension" ]
      } ],
      "mustSupport": true,
      "sliceName": "identifier",
      "max": "1",
      "id": "Communication.payload:attachment.extension:identifier",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Communication.payload:attachment.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x]",
      "min": 1,
      "definition": "A communicated content (or for multi-part communications, one portion of the communication).",
      "isModifier": false,
      "short": "Message part content",
      "type": [ {
        "code": "Attachment"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.payload:attachment.content[x]",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Communication.payload.content[x]"
      },
      "isSummary": false
    }, {
      "path": "Communication.payload.content[x].id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Communication.payload:attachment.content[x].id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Communication.payload.content[x].extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Communication.payload:attachment.content[x].extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].contentType",
      "requirements": "Processors of the data need to be able to know how to interpret the data.",
      "min": 0,
      "definition": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.",
      "isModifier": false,
      "short": "The content type shall be present when the content is an attachment included in the data element.",
      "mapping": [ {
        "map": "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used",
        "identity": "v2"
      }, {
        "map": "./mediaType, ./charset",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "http://medcomfhir.dk/ig/terminology/ValueSet/medcom-core-attachmentMimeTypes"
      },
      "max": "1",
      "id": "Communication.payload:attachment.content[x].contentType",
      "example": [ {
        "label": "General",
        "valueCode": "text/plain; charset=UTF-8, image/png"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.contentType"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].language",
      "requirements": "Users need to be able to choose between the languages in a set of attachments.",
      "min": 0,
      "definition": "The human language of the content. The value can be any valid value according to BCP 47.",
      "isModifier": false,
      "short": "Human language of the content (BCP-47)",
      "mapping": [ {
        "map": "./language",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "preferred",
        "valueSet": "http://hl7.org/fhir/ValueSet/languages",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Language"
        } ],
        "description": "A human language."
      },
      "max": "1",
      "id": "Communication.payload:attachment.content[x].language",
      "example": [ {
        "label": "General",
        "valueCode": "en-AU"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.language"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].data",
      "requirements": "The data needs to able to be transmitted inline.",
      "min": 0,
      "definition": "The actual data of the attachment - a sequence of bytes, base64 encoded.",
      "isModifier": false,
      "short": "Shall be present and contain the base64 encoded content of the attachment.",
      "mapping": [ {
        "map": "ED.5",
        "identity": "v2"
      }, {
        "map": "./data",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.payload:attachment.content[x].data",
      "comment": "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.data"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].url",
      "requirements": "The data needs to be transmitted by reference.",
      "min": 0,
      "definition": "A location where the data can be accessed.",
      "isModifier": false,
      "short": "Shall be present if the attachment is a link to a web page.",
      "mapping": [ {
        "map": "RP.1+RP.2 - if they refer to a URL (see v2.6)",
        "identity": "v2"
      }, {
        "map": "./reference/literal",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "url"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.payload:attachment.content[x].url",
      "comment": "If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.",
      "example": [ {
        "label": "General",
        "valueUrl": "http://www.acme.com/logo-small.png"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.url"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].size",
      "requirements": "Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.",
      "min": 0,
      "definition": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).",
      "isModifier": false,
      "short": "Number of bytes of content (if url provided)",
      "mapping": [ {
        "map": "N/A (needs data type R3 proposal)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "unsignedInt"
      } ],
      "max": "1",
      "id": "Communication.payload:attachment.content[x].size",
      "comment": "The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.size"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].hash",
      "requirements": "Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).",
      "min": 0,
      "definition": "The calculated hash of the data using SHA-1. Represented using base64.",
      "isModifier": false,
      "short": "Hash of the data (sha-1, base64ed)",
      "mapping": [ {
        "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "max": "1",
      "id": "Communication.payload:attachment.content[x].hash",
      "comment": "The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.hash"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].title",
      "requirements": "Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.",
      "min": 1,
      "definition": "A label or set of text to display in place of the data.",
      "isModifier": false,
      "short": "Label to display in place of the data",
      "mapping": [ {
        "map": "./title/data",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Communication.payload:attachment.content[x].title",
      "example": [ {
        "label": "General",
        "valueString": "Official Corporate Logo"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.title"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.payload.content[x].creation",
      "requirements": "This is often tracked as an integrity issue for use of the attachment.",
      "min": 0,
      "definition": "The date that the attachment was first created.",
      "isModifier": false,
      "short": "The time the attachment was created",
      "mapping": [ {
        "map": "N/A (needs data type R3 proposal)",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Communication.payload:attachment.content[x].creation",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.creation"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Communication.note",
      "min": 0,
      "definition": "Additional notes or commentary about the communication by the sender, receiver or other interested parties.",
      "isModifier": false,
      "short": "Comments made about the communication",
      "mapping": [ {
        "map": "Event.note",
        "identity": "workflow"
      } ],
      "type": [ {
        "code": "Annotation"
      } ],
      "max": "*",
      "id": "Communication.note",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Communication.note"
      },
      "isSummary": false
    } ]
  },
  "status": "active",
  "id": "96a63e75-9592-4a76-b01c-74ffe619cf21",
  "kind": "resource",
  "url": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
  "version": "4.0.0",
  "differential": {
    "element": [ {
      "id": "Communication",
      "path": "Communication",
      "constraint": [ {
        "key": "medcom-careCommunication-5",
        "human": "Priority must not be present when Communication.category is other than 'regarding-referral'",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "where(category.coding.code != 'regarding-referral').priority.empty()"
      }, {
        "key": "medcom-careCommunication-6",
        "human": "There shall exist a Communication.topic when Communication.category = 'other'",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "iif(category.coding.code != 'other', true, category.coding.code = 'other' and topic.exists())"
      }, {
        "key": "medcom-careCommunication-7",
        "human": "There shall exist a practitioner role when using a PractitionerRole as author in a message segment.",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "payload.where(extension('http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension').exists()).extension.value.reference.resolve().code.coding.code.exists()"
      }, {
        "key": "medcom-careCommunication-8",
        "human": "There shall exist a practitioner name when using a Practitioner as author in a message segment.",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "payload.where(extension('http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension').exists()).extension.value.reference.resolve().practitioner.resolve().name.exists()"
      }, {
        "key": "medcom-careCommunication-9",
        "human": "An episodeOfCare-identifier must be included when an Encounter instance is included.",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "iif(encounter.exists().not(), true, encounter.reference.resolve().episodeOfCare.identifier.exists())"
      } ]
    }, {
      "id": "Communication.extension",
      "path": "Communication.extension",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "Communication.extension:sender",
      "max": "1",
      "min": 0,
      "path": "Communication.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-sender-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "sender",
      "mustSupport": true
    }, {
      "id": "Communication.identifier",
      "max": "1",
      "min": 1,
      "path": "Communication.identifier",
      "short": "The communication identifier",
      "constraint": [ {
        "key": "medcom-uuidv4",
        "human": "The value shall correspond to the structure of an UUID version 4",
        "source": "http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-careCommunication-communication",
        "severity": "error",
        "expression": "value.matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')"
      } ],
      "mustSupport": true
    }, {
      "id": "Communication.identifier.value",
      "min": 1,
      "path": "Communication.identifier.value",
      "mustSupport": true
    }, {
      "id": "Communication.status",
      "path": "Communication.status",
      "mustSupport": true,
      "patternCode": "unknown"
    }, {
      "id": "Communication.category",
      "max": "1",
      "min": 1,
      "path": "Communication.category",
      "short": "The category (Danish: kategori) describes the overall content of the message.",
      "binding": {
        "strength": "required",
        "valueSet": "http://medcomfhir.dk/ig/terminology/ValueSet/medcom-careCommunication-categories"
      },
      "mustSupport": true
    }, {
      "id": "Communication.category.coding.system",
      "min": 1,
      "path": "Communication.category.coding.system",
      "mustSupport": true
    }, {
      "id": "Communication.category.coding.code",
      "min": 1,
      "path": "Communication.category.coding.code",
      "mustSupport": true
    }, {
      "id": "Communication.priority",
      "path": "Communication.priority",
      "short": "Shall be present if the message priority is known to be ASAP, but is only allowed when the category is 'regarding referral', see medcom-careCommunication-5",
      "binding": {
        "strength": "required",
        "valueSet": "http://medcomfhir.dk/ig/terminology/ValueSet/medcom-careCommunication-requestPriority"
      },
      "mustSupport": true
    }, {
      "id": "Communication.subject",
      "min": 1,
      "path": "Communication.subject",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "bundled" ],
        "targetProfile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-patient" ]
      } ],
      "mustSupport": true
    }, {
      "id": "Communication.topic",
      "path": "Communication.topic",
      "short": "The topic (Danish: emne) may be added as a supplement to the category. Topic must be added in the text-element.",
      "mustSupport": true
    }, {
      "id": "Communication.topic.text",
      "min": 1,
      "path": "Communication.topic.text",
      "mustSupport": true
    }, {
      "id": "Communication.encounter",
      "path": "Communication.encounter",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "bundled" ],
        "targetProfile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-encounter" ]
      } ],
      "short": "Shall contain a reference to an Encounter resource with a episodeOfCare-identifier, if the identifier is included in a previous message.",
      "mustSupport": true
    }, {
      "id": "Communication.recipient",
      "path": "Communication.recipient",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "bundled" ],
        "targetProfile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitionerrole", "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-careteam" ]
      } ],
      "short": "Describes a more specific receiver than the MessageHeader.destination.reciever, called a recipient. It may be a careteam a homecare group in the municipality or a named general practitioner.",
      "mustSupport": true
    }, {
      "id": "Communication.payload",
      "min": 1,
      "path": "Communication.payload",
      "short": "Each payload corresponds to a message segment with a message text or an attachment. At least one payload with a message text shall be included.",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "$this.content",
          "type": "type"
        } ]
      }
    }, {
      "id": "Communication.payload.extension",
      "path": "Communication.payload.extension",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "id": "Communication.payload.extension:date",
      "max": "1",
      "min": 0,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-datetime-extension" ]
      } ],
      "sliceName": "date"
    }, {
      "id": "Communication.payload.extension:author",
      "max": "1",
      "min": 0,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension" ]
      } ],
      "sliceName": "author"
    }, {
      "id": "Communication.payload.extension:authorContact",
      "max": "1",
      "min": 0,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-contact-extension" ]
      } ],
      "sliceName": "authorContact"
    }, {
      "id": "Communication.payload.extension:identifier",
      "max": "1",
      "min": 0,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-identifier-extension" ]
      } ],
      "sliceName": "identifier"
    }, {
      "id": "Communication.payload:string",
      "max": "*",
      "min": 1,
      "path": "Communication.payload",
      "sliceName": "string",
      "mustSupport": true
    }, {
      "id": "Communication.payload:string.extension",
      "min": 4,
      "path": "Communication.payload.extension"
    }, {
      "id": "Communication.payload:string.extension:date",
      "max": "1",
      "min": 1,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-datetime-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "date",
      "mustSupport": true
    }, {
      "id": "Communication.payload:string.extension:author",
      "max": "1",
      "min": 1,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "author",
      "mustSupport": true
    }, {
      "id": "Communication.payload:string.extension:authorContact",
      "max": "1",
      "min": 1,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-contact-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "authorContact",
      "mustSupport": true
    }, {
      "id": "Communication.payload:string.extension:identifier",
      "max": "1",
      "min": 1,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-identifier-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "identifier",
      "mustSupport": true
    }, {
      "id": "Communication.payload:string.content[x]",
      "path": "Communication.payload.content[x]",
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment",
      "max": "*",
      "min": 0,
      "path": "Communication.payload",
      "short": "The payload with an attachment shall contain a link or content attached to the message.",
      "sliceName": "attachment",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.extension",
      "min": 2,
      "path": "Communication.payload.extension"
    }, {
      "id": "Communication.payload:attachment.extension:date",
      "max": "1",
      "min": 1,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-datetime-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "date",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.extension:author",
      "max": "1",
      "min": 0,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-practitioner-extension" ]
      } ],
      "sliceName": "author",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.extension:authorContact",
      "max": "1",
      "min": 0,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-contact-extension" ]
      } ],
      "sliceName": "authorContact",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.extension:identifier",
      "max": "1",
      "min": 1,
      "path": "Communication.payload.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-core-identifier-extension" ]
      } ],
      "isSummary": true,
      "sliceName": "identifier",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.content[x]",
      "path": "Communication.payload.content[x]",
      "type": [ {
        "code": "Attachment"
      } ],
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.content[x].contentType",
      "path": "Communication.payload.content[x].contentType",
      "short": "The content type shall be present when the content is an attachment included in the data element.",
      "binding": {
        "strength": "required",
        "valueSet": "http://medcomfhir.dk/ig/terminology/ValueSet/medcom-core-attachmentMimeTypes"
      },
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.content[x].data",
      "path": "Communication.payload.content[x].data",
      "short": "Shall be present and contain the base64 encoded content of the attachment.",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.content[x].url",
      "path": "Communication.payload.content[x].url",
      "short": "Shall be present if the attachment is a link to a web page.",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.content[x].title",
      "min": 1,
      "path": "Communication.payload.content[x].title",
      "mustSupport": true
    }, {
      "id": "Communication.payload:attachment.content[x].creation",
      "path": "Communication.payload.content[x].creation",
      "short": "The time the attachment was created",
      "mustSupport": true
    } ]
  },
  "contact": [ {
    "name": "MedCom",
    "telecom": [ {
      "value": "http://www.medcom.dk",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Communication"
}