<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.clevermed.com/StructureDefinition/Encounter-BNet-Preg-KeyEvents" />
  <name value="Encounter-BNet-Preg-KeyEvents" />
  <status value="active" />
  <date value="2025-03-28T17:06:55.2872223Z" />
  <publisher value="Clevermed Ltd." />
  <contact>
    <name value="Clevermed BadgerNet Spine FHIR Team" />
    <telecom>
      <system value="email" />
      <value value="support@clevermed.com" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="" />
  <copyright value="(c) Clevermed Ltd.  Usage by permission and for BadgerNet Spine Platform integration only." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter.class">
      <path value="Encounter.class" />
      <short value="Fixed code for the class of the encounter" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.status">
      <path value="Encounter.status" />
      <short value="Fixed code for the status of the encounter" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject">
      <path value="Encounter.subject" />
      <short value="Reference back to root mother/pregnant person resource. The root patient resource should have an ID of $“Patient/{LogicalID}”" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceType">
      <path value="Encounter.serviceType" />
      <short value="Broad categorization of the service that is to be provided" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceType.coding.system">
      <path value="Encounter.serviceType.coding.system" />
      <fixedUri value="https://fhir.clevermed.com/codesystem" />
    </element>
    <element id="Encounter.serviceType.coding.code">
      <path value="Encounter.serviceType.coding.code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Types of admitted locations" />
        <valueSet value="https://simplifier.net/badgernet/ValueSet-BNet-Preg-KeyEventAdmittedType" />
      </binding>
    </element>
    <element id="Encounter.period.start">
      <path value="Encounter.period.start" />
      <short value="Refers to the time during which the patient was admitted" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period.end">
      <path value="Encounter.period.end" />
      <short value="Refers to the time during which the patient was discharged" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reason.coding">
      <path value="Encounter.reason.coding" />
      <short value="Reason for this admission encounter" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reason.coding.coding.system">
      <path value="Encounter.reason.coding.coding.system" />
      <fixedUri value="https://fhir.clevermed.com/codesystem" />
    </element>
    <element id="Encounter.reason.coding.coding.code">
      <path value="Encounter.reason.coding.coding.code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Main reasons for key events" />
        <valueSet value="https://simplifier.net/badgernet/ValueSet-BNet-Preg-KeyEventMainReason" />
      </binding>
    </element>
    <element id="Encounter.reason.coding.text">
      <path value="Encounter.reason.coding.text" />
      <short value="String for 'other' value" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceProvider">
      <path value="Encounter.serviceProvider" />
      <short value="The organization (facility) responsible for this admission" />
      <definition value="When sent, the active care location for the pregnancy record will automatically switch to the provided care location in this element, and an admission date time is sent.&#xA;      &lt;br&gt;When a discharge date time is sent, the care location will be automatically changed back to the preceding active care location." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>