{
  "resourceType": "StructureDefinition",
  "id": "CTrachL2DnaXxxQlPcr",
  "url": "http://fhir.org/guides/hspc/StructureDefinition/CTrachL2DnaXxxQlPcr",
  "version": "2.0.0",
  "name": "HSPC CTrachL2DnaXxxQlPcr Profile",
  "status": "draft",
  "date": "2017-05-15",
  "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://fhir.org/guides/hspc/StructureDefinition/hspc-stdord",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation:hspcCTrachL2DnaXxxQlPcr",
        "path": "Observation",
        "sliceName": "hspcCTrachL2DnaXxxQlPcr",
        "short": "HSPC HSPC ChlamydiaDnaXxxQlPcr Profile",
        "constraint": [
          {
            "key": "1",
            "severity": "error",
            "human": "Must have either a value or a dataAbsentReason but not both",
            "expression": "value xor dataAbsentReason",
            "xpath": "(f:value or f:dataAbsentReason) and (not(f:value and f:dataAbsentReason))"
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Observation:hspcCTrachL2DnaXxxQlPcr.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": "47211-8",
              "display": "Chlamydia trachomatis L2 DNA [Presence] in Unspecified specimen by Probe and target amplification method"
            }
          ]
        },
        "mustSupport": true,
        "isModifier": false,
        "binding": {
          "strength": "preferred",
          "description": "Standard LOINC ordinal codes",
          "valueSetReference": {
            "reference": "http://fhir.org/guides/hspc/ValueSet/OrdinalLabCodes"
          }
        },
        "mapping": [
          {
            "identity": "argonaut-dq-dstu2",
            "map": "Observation.code"
          }
        ]
      },
      {
        "id": "Observation:hspcCTrachL2DnaXxxQlPcr.valueCodeableConcept",
        "path": "Observation.valueCodeableConcept",
        "short": "Result Value",
        "definition": "The Laboratory result value.  If a coded value,  the valueCodeableConcept.code **SHOULD**  be selected from [SNOMED CT](http://hl7.org/fhir/ValueSet/uslab-obs-codedresults).  If a numeric value, valueQuantity.code **SHALL** be selected from [UCUM](http://unitsofmeasure.org).  A FHIR [UCUM Codes value set](http://hl7.org/fhir/STU3/valueset-ucum-units.html) that defines all UCUM codes is in the FHIR specification.",
        "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
        "requirements": "An observation exists to have a value, though it may not if it is in error, or if it represents a group of observations.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Observation.value[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept",
            "profile": "http://hl7.org/fhir/StructureDefinition/CodeableConcept"
          }
        ],
        "condition": [
          "obs-7"
        ],
        "constraint": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
                "valueBoolean": true
              }
            ],
            "key": "us-core-4",
            "severity": "warning",
            "human": "SHOULD use Snomed CT for coded Results",
            "expression": "valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = 'http://snomed.info/sct'",
            "xpath": "not(exists(f:valueCodeableConcept/f:coding/f:system) ) or  f:valueCodeableConcept/f:coding/f:system[@value='http://snomed.info/sct']"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "binding": {
          "strength": "preferred",
          "description": "The codes used as result values",
          "valueSetReference": {
            "reference": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.3"
          }
        }
      }
    ]
  }
}