{
  "resourceType": "StructureDefinition",
  "id": "hspc-gravidity",
  "url": "http://fhir.org/guides/hspc/StructureDefinition/hspc-gravidity",
  "version": "1.0.0",
  "name": "HSPC Gravidity Measurement",
  "status": "draft",
  "date": "2017-05-01",
  "publisher": "HSPC",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://healthcaresoa.org"
        }
      ]
    }
  ],
  "fhirVersion": "3.0.0",
  "mapping": [
    {
      "identity": "argonaut-dq-dstu2",
      "uri": "http://unknown.org/Argonaut DQ DSTU2",
      "name": "Argonaut DQ DSTU2"
    },
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Mapping"
    },
    {
      "identity": "sct-concept",
      "uri": "http://snomed.info/conceptdomain",
      "name": "SNOMED CT Concept Domain Binding"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "sct-attr",
      "uri": "http://snomed.info/sct",
      "name": "SNOMED CT Attribute Binding"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation:hspcgravidity",
        "path": "Observation",
        "sliceName": "hspcgravidity",
        "short": "HSPC Gravidity",
        "definition": "The HSPC Gravidity profile is based on the US Core Result Observation profile.",
        "alias": [
          "Obs"
        ],
        "constraint": [
          {
            "key": "us-core-2",
            "severity": "error",
            "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
            "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
            "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value)]) or exists(f:dataAbsentReason)"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "mapping": [
          {
            "identity": "argonaut-dq-dstu2",
            "map": "Observation"
          }
        ]
      },
      {
        "id": "Observation:hspcgravidity.code",
        "path": "Observation.code",
        "short": "Laboratory Test Name",
        "definition": "The test that was performed.  A LOINC **SHALL** be used if the concept is present in LOINC.",
        "comment": "The typical patterns for codes are:  1)  a LOINC code either as a  translation from a \"local\" code or as a primary code, or 2)  a local code only if no suitable LOINC exists,  or 3)  both the local and the LOINC translation.   Systems SHALL be capable of sending the local code if one exists.  When using LOINC , Use either the SHORTNAME or LONG_COMMON_NAME field for the display.",
        "alias": [
          "Test Name",
          "Observation Identifer"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "11996-6",
              "display": "[#]Pregnancies"
            }
          ]
        },
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "argonaut-dq-dstu2",
            "map": "Observation.code"
          }
        ]
      },
      {
        "id": "Observation:hspcgravidity.performer",
        "path": "Observation.performer",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://fhir.org/guides/hspc/StructureDefinition/hspc-provpract"
          },
          {
            "code": "Reference",
            "profile": "http://fhir.org/guides/hspc/StructureDefinition/hspc-organization"
          },
          {
            "code": "Reference",
            "profile": "http://fhir.org/guides/hspc/StructureDefinition/hspc-patient"
          },
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.valueQuantity",
        "path": "Observation.valueQuantity",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": "http://hl7.org/fhir/StructureDefinition/Quantity"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.valueQuantity.system",
        "path": "Observation.valueQuantity.system",
        "type": [
          {
            "code": "uri",
            "profile": "http://hl7.org/fhir/StructureDefinition/uri"
          }
        ],
        "fixedUri": "http://unitsofmeasure.org",
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.valueQuantity.code",
        "path": "Observation.valueQuantity.code",
        "type": [
          {
            "code": "code",
            "profile": "http://hl7.org/fhir/StructureDefinition/code"
          }
        ],
        "fixedCode": "{count}",
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.bodySite",
        "path": "Observation.bodySite",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.specimen",
        "path": "Observation.specimen",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Reference"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.device",
        "path": "Observation.device",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Reference"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.referenceRange",
        "path": "Observation.referenceRange",
        "min": 0,
        "max": "0",
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.related",
        "path": "Observation.related",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Reference"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcgravidity.component",
        "path": "Observation.component",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Reference"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      }
    ]
  }
}