{
  "resourceType": "StructureDefinition",
  "url": "http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum",
  "version": "1.0.0",
  "name": "FrSimpleQuantityUcum",
  "title": "SimpleQuantity with UCUM quantity unit",
  "status": "draft",
  "date": "2021-10-18",
  "publisher": "InterOp'Santé - FRANCE",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir@interopsante.org"
        }
      ]
    }
  ],
  "description": "simple quantity datatype requiring a UCUM unit",
  "purpose": "force UCUM unit code usage",
  "copyright": "Phast 2019",
  "fhirVersion": "4.0.1",
  "kind": "complex-type",
  "abstract": false,
  "type": "Quantity",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Quantity",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Quantity",
        "path": "Quantity",
        "short": "A fixed quantity (no comparator) with UCUM unit",
        "definition": "The comparator is not used on a SimpleQuantity. The unit SHALL be a UCUM code.",
        "comment": "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use explicitely excludes the use of the simpleQuantity \"comparator\" element.",
        "constraint": [
          {
            "key": "sqty-1",
            "severity": "warning",
            "human": "The comparator is not used on a SimpleQuantity",
            "expression": "comparator.empty()",
            "xpath": "not(exists(f:comparator))",
            "source": "Quantity"
          }
        ]
      },
      {
        "id": "Quantity.comparator",
        "path": "Quantity.comparator",
        "definition": "Not allowed to be used in this context",
        "max": "0"
      },
      {
        "id": "Quantity.system",
        "path": "Quantity.system",
        "definition": "UCUM requiered for the identification of the system that provides the coded form of the unit.",
        "requirements": "UCUM requiered.",
        "min": 1,
        "fixedUri": "http://unitsofmeasure.org",
        "mustSupport": true
      },
      {
        "id": "Quantity.code",
        "path": "Quantity.code",
        "comment": "UCUM code required.",
        "min": 1
      }
    ]
  }
}