{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2018-10-30T16:33:19.601+00:00"
  },
  "url": "http://interopsante.org/fhir/structuredefinition/schedule/fr-service-type-duration",
  "version": "1.0",
  "name": "fr-service-type-duration",
  "status": "active",
  "date": "2018-10-30T16:33:19.5009763+00:00",
  "publisher": "InteropSanté",
  "contact": [
    {
      "name": "François Macary/Isabelle Gibaud",
      "telecom": [
        {
          "system": "email",
          "value": "francois.macary@phast.fr",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This French extension allows to associate the type of service with the duration of this service | Cette extension française permet d'associer le type de service avec la durée de ce service.",
  "fhirVersion": "3.0.1",
  "kind": "complex-type",
  "abstract": false,
  "contextType": "resource",
  "context": [
    "Schedule"
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Optional Extensions Element",
        "definition": "Optional Extension Element - found in all resources.",
        "base": {
          "path": "Element",
          "min": 0,
          "max": "*"
        },
        "constraint": [
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Extension.extension:serviceType",
        "path": "Extension.extension",
        "sliceName": "serviceType",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "extensible",
          "description": "This value set defines an example set of codes of service-types.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/service-type"
          }
        }
      },
      {
        "id": "Extension.extension:serviceType.url",
        "path": "Extension.extension.url",
        "fixedUri": "serviceType"
      },
      {
        "id": "Extension.extension:serviceType.value[x]:valueCodeableConcept",
        "path": "Extension.extension.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Extension.extension:duration",
        "path": "Extension.extension",
        "sliceName": "duration",
        "short": "Duration of the service | durée du service",
        "definition": "Duration of the service that has to be performed during the appointment | Durée du service à assurer durant le RDV",
        "max": "1"
      },
      {
        "id": "Extension.extension:duration.url",
        "path": "Extension.extension.url",
        "fixedUri": "duration"
      },
      {
        "id": "Extension.extension:duration.value[x]:valueDuration",
        "path": "Extension.extension.valueDuration",
        "sliceName": "valueDuration",
        "type": [
          {
            "code": "Duration"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "http://interopsante.org/fhir/structuredefinition/schedule/fr-service-type-duration"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "max": "0"
      }
    ]
  }
}