<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="thiemeecpcommunication-profile" />
  <url value="http://fhir.xt.dev/StructureDefinition/ThiemeEcpCommunication" />
  <version value="1.1.1" />
  <name value="ThiemeEcpCommunication" />
  <status value="active" />
  <date value="2024-11-25T23:33:35.8530842+00:00" />
  <publisher value="x-tention Informationstechnologie GmbH" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="fhir.profiling@x-tention.com" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="This Communication resource represents a transmission of a filled out anamnesis form from the IOP/patient portal to a Thieme eConsent Pro installation in one of the participating hospitals." />
  <copyright value="x-tention Informationstechnologie GmbH" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Communication" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Communication" />
  <derivation value="constraint" />
  <differential>
    <element id="Communication.status">
      <path value="Communication.status" />
      <short value="preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error" />
      <definition value="The status of the transmission. The status may be &quot;on-hold&quot; if the patientId in the target system could not be identified yet. Once the transmission has been completed, the status must change to &quot;completed&quot;. If an error occurred, the status &quot;not-done&quot; must be used in conjunction with &quot;http://hl7.org/fhir/ValueSet/communication-not-done-reason|system-error&quot; as statusReason." />
    </element>
    <element id="Communication.statusReason">
      <path value="Communication.statusReason" />
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.xt.dev/ValueSet/CommunicationStatusReasonCodes" />
      </binding>
    </element>
    <element id="Communication.statusReason.coding">
      <path value="Communication.statusReason.coding" />
      <definition value="A reference to a code defined by a terminology system. Must be single-valued if the statusReason is not empty." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.statusReason.coding.system">
      <path value="Communication.statusReason.coding.system" />
      <min value="1" />
    </element>
    <element id="Communication.statusReason.coding.version">
      <path value="Communication.statusReason.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.statusReason.coding.code">
      <path value="Communication.statusReason.coding.code" />
      <min value="1" />
    </element>
    <element id="Communication.statusReason.coding.userSelected">
      <path value="Communication.statusReason.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.category">
      <path value="Communication.category" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.category.coding">
      <path value="Communication.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.category.coding.system">
      <path value="Communication.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://fhir.xt.dev/CodeSystem/SystemCommunicationCategories" />
    </element>
    <element id="Communication.category.coding.version">
      <path value="Communication.category.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.category.coding.code">
      <path value="Communication.category.coding.code" />
      <min value="1" />
      <fixedCode value="outgoing-fhir" />
    </element>
    <element id="Communication.category.coding.userSelected">
      <path value="Communication.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.category.text">
      <path value="Communication.category.text" />
      <max value="0" />
    </element>
    <element id="Communication.priority">
      <path value="Communication.priority" />
      <max value="0" />
    </element>
    <element id="Communication.medium">
      <path value="Communication.medium" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.medium.coding">
      <path value="Communication.medium.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.medium.coding.system">
      <path value="Communication.medium.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/endpoint-connection-type" />
    </element>
    <element id="Communication.medium.coding.version">
      <path value="Communication.medium.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.medium.coding.code">
      <path value="Communication.medium.coding.code" />
      <min value="1" />
      <fixedCode value="hl7-fhir-rest" />
    </element>
    <element id="Communication.medium.coding.userSelected">
      <path value="Communication.medium.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.medium.text">
      <path value="Communication.medium.text" />
      <max value="0" />
    </element>
    <element id="Communication.subject">
      <path value="Communication.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.subject.reference">
      <path value="Communication.subject.reference" />
      <min value="1" />
    </element>
    <element id="Communication.subject.identifier">
      <path value="Communication.subject.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.topic">
      <path value="Communication.topic" />
      <max value="0" />
    </element>
    <element id="Communication.about">
      <path value="Communication.about" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="closed" />
      </slicing>
    </element>
    <element id="Communication.about:targetNamespace">
      <path value="Communication.about" />
      <sliceName value="targetNamespace" />
      <short value="Target PatientID Namespace" />
      <definition value="Namespace for patients in the target system, must be contained in this Communication resource" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/NamingSystem" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="Communication.about:targetNamespace.reference">
      <path value="Communication.about.reference" />
      <min value="1" />
    </element>
    <element id="Communication.about:targetNamespace.type">
      <path value="Communication.about.type" />
      <min value="1" />
      <fixedUri value="NamingSystem" />
    </element>
    <element id="Communication.about:targetNamespace.identifier">
      <path value="Communication.about.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.about:questionnaireResponse">
      <path value="Communication.about" />
      <sliceName value="questionnaireResponse" />
      <short value="QuestionnaireResponse for transmission" />
      <definition value="QuestionnaireResponse intended for transmission to Thieme eCP, must be referenced using a literal reference" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.about:questionnaireResponse.reference">
      <path value="Communication.about.reference" />
      <min value="1" />
    </element>
    <element id="Communication.about:questionnaireResponse.type">
      <path value="Communication.about.type" />
      <min value="1" />
      <fixedUri value="QuestionnaireResponse" />
    </element>
    <element id="Communication.about:questionnaireResponse.identifier">
      <path value="Communication.about.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.about:targetEndpoint">
      <path value="Communication.about" />
      <sliceName value="targetEndpoint" />
      <short value="Target Endpoint" />
      <definition value="Target Endpoint at the receiving Organization" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Endpoint" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.about:targetEndpoint.reference">
      <path value="Communication.about.reference" />
      <min value="1" />
    </element>
    <element id="Communication.about:targetEndpoint.type">
      <path value="Communication.about.type" />
      <min value="1" />
      <fixedUri value="Endpoint" />
    </element>
    <element id="Communication.about:targetEndpoint.identifier">
      <path value="Communication.about.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.about:questionnaireTask">
      <path value="Communication.about" />
      <sliceName value="questionnaireTask" />
      <short value="Questionnaire Task" />
      <definition value="Task that caused the patient to fill out the questionnaire" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Task" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.about:questionnaireTask.reference">
      <path value="Communication.about.reference" />
      <min value="1" />
    </element>
    <element id="Communication.about:questionnaireTask.type">
      <path value="Communication.about.type" />
      <min value="1" />
      <fixedUri value="Task" />
    </element>
    <element id="Communication.about:questionnaireTask.identifier">
      <path value="Communication.about.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.sent">
      <path value="Communication.sent" />
      <definition value="The time the first resource is transmitted." />
    </element>
    <element id="Communication.received">
      <path value="Communication.received" />
      <definition value="The time Thieme eCP acknowledges the receipt of the QuestionnaireResponse resource." />
    </element>
    <element id="Communication.recipient">
      <path value="Communication.recipient" />
      <definition value="The organization which was the target of the communication." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.recipient.reference">
      <path value="Communication.recipient.reference" />
      <min value="1" />
    </element>
    <element id="Communication.recipient.identifier">
      <path value="Communication.recipient.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.sender">
      <path value="Communication.sender" />
      <definition value="The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication. In this case the requester of the questionnaire task is considered the source of the communication." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.sender.reference">
      <path value="Communication.sender.reference" />
      <min value="1" />
    </element>
    <element id="Communication.sender.type">
      <path value="Communication.sender.type" />
      <short value="Organization or Practitioner" />
      <min value="1" />
    </element>
    <element id="Communication.sender.identifier">
      <path value="Communication.sender.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode">
      <path value="Communication.reasonCode" />
      <max value="0" />
    </element>
    <element id="Communication.reasonReference">
      <path value="Communication.reasonReference" />
      <max value="0" />
    </element>
    <element id="Communication.payload">
      <path value="Communication.payload" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>