{
  "resourceType": "StructureDefinition",
  "url": "http://example.org/fhir/StructureDefinition/Ratio_apimin",
  "name": "Ratio_apimin",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "kind": "complex-type",
  "abstract": false,
  "type": "Ratio",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Ratio",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Ratio",
        "path": "Ratio",
        "short": "A ratio of two Quantity values - a numerator and a denominator",
        "definition": "A relationship of two Quantity values - expressed as a numerator and a denominator.",
        "constraint": [
          {
            "key": "rat-1",
            "severity": "error",
            "human": "Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present",
            "expression": "(numerator.empty() xor denominator.exists()) and (numerator.exists() or extension.exists())",
            "xpath": "(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) > 0) or (count(f:extension) > 0))"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "N/A"
          },
          {
            "identity": "rim",
            "map": "RTO"
          }
        ]
      },
      {
        "id": "Ratio.numerator.value",
        "path": "Ratio.numerator.value",
        "short": "La cantidad de consumo del medicamento.",
        "definition": "La cantidad de consumo del medicamento.",
        "mapping": [
          {
            "identity": "api-minsal",
            "map": "DOSIS"
          }
        ]
      },
      {
        "id": "Ratio.denominator.value",
        "path": "Ratio.denominator.value",
        "short": "Frecuencia de consumo del medicamento.",
        "definition": "La cantidad de veces que se debe consumir el medicamento por el día.",
        "mapping": [
          {
            "identity": "api-minsal",
            "map": "FREC_TRATAMIENTO"
          }
        ]
      }
    ]
  }
}