<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://vvis.gov.lv/fhir/StructureDefinition/Schedule-v1" />
  <version value="0.1" />
  <name value="Schedule" />
  <title value="Kalendārs" />
  <status value="draft" />
  <date value="2025-04" />
  <publisher value="LDVC" />
  <description value="Satur iestādes vai konkrētas filiāles pieejamību." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Schedule" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Schedule" />
  <derivation value="constraint" />
  <differential>
    <element id="Schedule.id">
      <path value="Schedule.id" />
      <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.&#xD;&#xA;&#xD;&#xA;//Iekšējais e-pieraksta ID. Tiek sagaidīts tikai UPDATE pieprasījumos." />
    </element>
    <element id="Schedule.identifier">
      <path value="Schedule.identifier" />
      <definition value="External Ids for this item.&#xD;&#xA;&#xD;&#xA;//Izmantot, lai meklētu pēc ID. Netiek definēta iestāde, ID var sakritst starp dažādām iestādēm." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.identifier.use">
      <path value="Schedule.identifier.use" />
      <max value="0" />
    </element>
    <element id="Schedule.identifier.type">
      <path value="Schedule.identifier.type" />
      <max value="0" />
    </element>
    <element id="Schedule.identifier.system">
      <path value="Schedule.identifier.system" />
      <max value="0" />
    </element>
    <element id="Schedule.identifier.value">
      <path value="Schedule.identifier.value" />
      <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system.&#xD;&#xA;&#xD;&#xA;//Ierobežojums uz 20 simboliem." />
      <min value="1" />
      <maxLength value="20" />
    </element>
    <element id="Schedule.identifier.period">
      <path value="Schedule.identifier.period" />
      <max value="0" />
    </element>
    <element id="Schedule.identifier.assigner">
      <path value="Schedule.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Schedule.identifier.assigner.reference">
      <path value="Schedule.identifier.assigner.reference" />
      <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.&#xD;&#xA;&#xD;&#xA;//Lai references tips atbilst" />
      <max value="0" />
    </element>
    <element id="Schedule.identifier.assigner.type">
      <path value="Schedule.identifier.assigner.type" />
      <definition value="The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.&#xA;&#xA;The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. &quot;Patient&quot; is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).&#xD;&#xA;&#xD;&#xA;//ID piešķīrējs ir no savas organizācijas, lai varētu pateikt, ka viņu iesūtītais ID ir unikāls." />
      <min value="1" />
      <fixedUri value="Organization" />
      <binding>
        <strength value="required" />
      </binding>
    </element>
    <element id="Schedule.active">
      <path value="Schedule.active" />
      <definition value="Whether this schedule record is in active use or should not be used (such as was entered in error).&#xD;&#xA;&#xD;&#xA;//Norāda vai kalendārs ir - aktīvs vai neaktīvs." />
      <min value="1" />
    </element>
    <element id="Schedule.serviceCategory">
      <path value="Schedule.serviceCategory" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.system" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <definition value="A broad categorization of the service that is to be performed during this appointment.&#xD;&#xA;&#xD;&#xA;//Ir izveidotas 2 kategorijas, kas apzīmē pakalpojumu saraksta hierarhiju. 1 - pakalpojumu grupa, 2 - pakalpojumu veids." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory">
      <path value="Schedule.serviceCategory" />
      <sliceName value="majorCategory" />
      <definition value="A broad categorization of the service that is to be performed during this appointment.&#xD;&#xA;&#xD;&#xA;//Major kategorija nosaka pakalpojumu grupu. Piemēram: ambulatorie pakalpojumi, stacionārie pakalpojumi, dienas stacionāra pakalpojumi, laboratorijas pakalpojumi u.c." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.coding">
      <path value="Schedule.serviceCategory.coding" />
      <definition value="A reference to a code defined by a terminology system.&#xD;&#xA;&#xD;&#xA;//Pasaka, ka te jāsūta vērtība no klasifikatora" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.coding.system">
      <path value="Schedule.serviceCategory.coding.system" />
      <definition value="The identification of the code system that defines the meaning of the symbol in the code.&#xD;&#xA;&#xD;&#xA;//Pasaka, ka vērtības jāņem no 1.3.6.1.4.1.38760.2.914" />
      <min value="1" />
      <fixedUri value="uri:1.3.6.1.4.1.38760.2.914" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.coding.version">
      <path value="Schedule.serviceCategory.coding.version" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.coding.code">
      <path value="Schedule.serviceCategory.coding.code" />
      <definition value="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).&#xD;&#xA;&#xD;&#xA;//Klasifikatora vērtības kods." />
      <min value="1" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.coding.display">
      <path value="Schedule.serviceCategory.coding.display" />
      <definition value="A representation of the meaning of the code in the system, following the rules of the system.&#xD;&#xA;&#xD;&#xA;//Klasifikatora vērtības display name." />
      <min value="1" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.coding.userSelected">
      <path value="Schedule.serviceCategory.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceCategory:majorCategory.text">
      <path value="Schedule.serviceCategory.text" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory">
      <path value="Schedule.serviceCategory" />
      <sliceName value="minorCategory" />
      <definition value="A broad categorization of the service that is to be performed during this appointment.&#xD;&#xA;&#xD;&#xA;//Minor kategorija nosaka pakalpojumu veidu. Piemēram: Konsultācijas, Izmeklējumi, Funkcionālie izmeklējumi, Specializēti kabineti u.c." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.coding">
      <path value="Schedule.serviceCategory.coding" />
      <definition value="A reference to a code defined by a terminology system.&#xD;&#xA;&#xD;&#xA;//" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.coding.system">
      <path value="Schedule.serviceCategory.coding.system" />
      <definition value="The identification of the code system that defines the meaning of the symbol in the code.&#xD;&#xA;&#xD;&#xA;//Šim jāizveido klasifikators. (Piemēram: 1.3.6.1.4.1.38760.2.nnn)" />
      <min value="1" />
      <fixedUri value="uri:1.3.6.1.4.1.38760.2.nnn" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.coding.version">
      <path value="Schedule.serviceCategory.coding.version" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.coding.code">
      <path value="Schedule.serviceCategory.coding.code" />
      <definition value="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).&#xD;&#xA;&#xD;&#xA;//Klasifikatora vērtības kods." />
      <min value="1" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.coding.display">
      <path value="Schedule.serviceCategory.coding.display" />
      <definition value="A representation of the meaning of the code in the system, following the rules of the system.&#xD;&#xA;&#xD;&#xA;//Klasifikatora vērtības display name." />
      <min value="1" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.coding.userSelected">
      <path value="Schedule.serviceCategory.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceCategory:minorCategory.text">
      <path value="Schedule.serviceCategory.text" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceType">
      <path value="Schedule.serviceType" />
      <definition value="The specific service that is to be performed during this appointment.&#xD;&#xA;&#xD;&#xA;//Pakalpojumu klasifikators, MVP kārtā satur tikai konsultācijas, piemēram: Alergologa konsultācija, Ķirurga konsultācija, Neirologa konsultācija u.c." />
      <min value="1" />
      <max value="5" />
    </element>
    <element id="Schedule.serviceType.concept">
      <path value="Schedule.serviceType.concept" />
      <min value="1" />
    </element>
    <element id="Schedule.serviceType.concept.coding">
      <path value="Schedule.serviceType.concept.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.serviceType.concept.coding.system">
      <path value="Schedule.serviceType.concept.coding.system" />
      <definition value="The identification of the code system that defines the meaning of the symbol in the code.&#xD;&#xA;&#xD;&#xA;//Jaunais pakalpojumu klasifikators - ķirurga, neirologa, ginekologa konsultācija u.c." />
      <min value="1" />
      <fixedUri value="uri:1.3.6.1.4.1.38760.2.nnn" />
    </element>
    <element id="Schedule.serviceType.concept.coding.version">
      <path value="Schedule.serviceType.concept.coding.version" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceType.concept.coding.code">
      <path value="Schedule.serviceType.concept.coding.code" />
      <min value="1" />
    </element>
    <element id="Schedule.serviceType.concept.coding.display">
      <path value="Schedule.serviceType.concept.coding.display" />
      <min value="1" />
    </element>
    <element id="Schedule.serviceType.concept.coding.userSelected">
      <path value="Schedule.serviceType.concept.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceType.concept.text">
      <path value="Schedule.serviceType.concept.text" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceType.reference">
      <path value="Schedule.serviceType.reference" />
      <min value="1" />
    </element>
    <element id="Schedule.serviceType.reference.reference">
      <path value="Schedule.serviceType.reference.reference" />
      <min value="1" />
    </element>
    <element id="Schedule.serviceType.reference.type">
      <path value="Schedule.serviceType.reference.type" />
      <min value="1" />
      <fixedUri value="HealthcareService" />
    </element>
    <element id="Schedule.serviceType.reference.identifier">
      <path value="Schedule.serviceType.reference.identifier" />
      <max value="0" />
    </element>
    <element id="Schedule.serviceType.reference.display">
      <path value="Schedule.serviceType.reference.display" />
      <max value="0" />
    </element>
    <element id="Schedule.specialty">
      <path value="Schedule.specialty" />
      <definition value="The specialty of a practitioner that would be required to perform the service requested in this appointment.&#xD;&#xA;&#xD;&#xA;//Definē kurai ārsta specialitātei šis kalendārs pieder." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.specialty.coding">
      <path value="Schedule.specialty.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Schedule.specialty.coding.system">
      <path value="Schedule.specialty.coding.system" />
      <definition value="The identification of the code system that defines the meaning of the symbol in the code.&#xD;&#xA;&#xD;&#xA;//Izmantots klasifikators: 1.3.6.1.4.1.38760.2.38" />
      <min value="1" />
      <fixedUri value="uri:1.3.6.1.4.1.38760.2.38" />
    </element>
    <element id="Schedule.specialty.coding.version">
      <path value="Schedule.specialty.coding.version" />
      <max value="0" />
    </element>
    <element id="Schedule.specialty.coding.code">
      <path value="Schedule.specialty.coding.code" />
      <definition value="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).&#xD;&#xA;&#xD;&#xA;//Klasifikatora vērtības kods." />
      <min value="1" />
    </element>
    <element id="Schedule.specialty.coding.display">
      <path value="Schedule.specialty.coding.display" />
      <definition value="A representation of the meaning of the code in the system, following the rules of the system.&#xD;&#xA;&#xD;&#xA;//Klasifikatora vērtības nosaukums." />
      <min value="1" />
    </element>
    <element id="Schedule.specialty.coding.userSelected">
      <path value="Schedule.specialty.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Schedule.specialty.text">
      <path value="Schedule.specialty.text" />
      <max value="0" />
    </element>
    <element id="Schedule.name">
      <path value="Schedule.name" />
      <definition value="Further description of the schedule as it would be presented to a consumer while searching." />
      <max value="0" />
    </element>
    <element id="Schedule.actor">
      <path value="Schedule.actor" />
      <definition value="Slots that reference this schedule resource provide the availability details to these referenced resource(s).&#xD;&#xA;&#xD;&#xA;//Ārsta līgumattiecība. Ārsts, kurš sniegs pakalpojumu." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
      </type>
    </element>
    <element id="Schedule.actor.extension">
      <path value="Schedule.actor.extension" />
      <definition value="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 managable, 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.&#xD;&#xA;&#xD;&#xA;//Pievienots extensions valodām" />
    </element>
    <element id="Schedule.actor.reference">
      <path value="Schedule.actor.reference" />
      <min value="1" />
    </element>
    <element id="Schedule.actor.type">
      <path value="Schedule.actor.type" />
      <min value="1" />
      <fixedUri value="PractitionerRole" />
    </element>
    <element id="Schedule.actor.identifier">
      <path value="Schedule.actor.identifier" />
      <max value="0" />
    </element>
    <element id="Schedule.actor.display">
      <path value="Schedule.actor.display" />
      <max value="0" />
    </element>
    <element id="Schedule.planningHorizon">
      <path value="Schedule.planningHorizon" />
      <min value="1" />
    </element>
    <element id="Schedule.planningHorizon.start">
      <path value="Schedule.planningHorizon.start" />
      <definition value="The start of the period. The boundary is inclusive.&#xD;&#xA;&#xD;&#xA;//Sagaidām datumu un laiku" />
      <min value="1" />
    </element>
    <element id="Schedule.planningHorizon.end">
      <path value="Schedule.planningHorizon.end" />
      <definition value="The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.&#xD;&#xA;&#xD;&#xA;//Sagaidām datumu un laiku" />
      <min value="1" />
    </element>
    <element id="Schedule.comment">
      <path value="Schedule.comment" />
      <definition value="Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.&#xD;&#xA;&#xD;&#xA;//Tiek sagaidīti vecuma ierobežojumi - kādās vecuma robežās ārsts pieņems pacientus. Piemēram 1-7; 1-18; 18+; u.c." />
    </element>
  </differential>
</StructureDefinition>