Skip to content

Observation

Martin Heitmann edited this page Nov 18, 2019 · 1 revision

Observation

Query Observation (single)

query Observation {
    Observation(_id: "5dcc0734d39e0045d82b6eae") {
        id
        status
    }
}

Query Observation (list)

query ObservationList {
  ObservationList {
    entry {
      resource {
        ...on Observation {
          id
          resourceType
        }
      }
    }
  }
}

Mutation Create Observation

mutation ObservationCreate {
    ObservationCreate(resource: {

  resourceType: Observation,
  status: "final",
  category: [
    {
      coding: [
        {
          system: "http://terminology.hl7.org/CodeSystem/observation-category",
          code: "vital-signs",
          display: "Vital Signs"
        }
      ]
    }
  ],
  code: {
    coding: [
      {
        system: "http://loinc.org",
        code: "29463-7",
        display: "Body Weight"
      },
      {
        system: "http://loinc.org",
        code: "3141-9",
        display: "Body weight Measured"
      },
      {
        system: "http://snomed.info/sct",
        code: "27113001",
        display: "Body weight"
      },
      {
        system: "http://acme.org/devices/clinical-codes",
        code: "body-weight",
        display: "Body Weight"
      }
    ]
  },
  effectiveDateTime: "2016-03-28",
  valueQuantity: {
    value: 185,
    unit: "lbs",
    system: "http://unitsofmeasure.org",
    code: "[lb_av]"
  }
}
) {
    id
    resourceType
}
}

Mutation Update Observation


mutation ObservationUpdate {
    ObservationUpdate(id: "5dcc015778507e0ad027830d", resource: {
  resourceType: Observation,
  status: "final",
  category: [
    {
      coding: [
        {
          system: "http://terminology.hl7.org/CodeSystem/observation-category",
          code: "vital-signs",
          display: "Vital Signs"
        }
      ]
    }
  ],
  code: {
    coding: [
      {
        system: "http://loinc.org",
        code: "29463-7",
        display: "Body Weight"
      },
      {
        system: "http://loinc.org",
        code: "3141-9",
        display: "Body weight Measured"
      },
      {
        system: "http://snomed.info/sct",
        code: "27113001",
        display: "Body weight"
      },
      {
        system: "http://acme.org/devices/clinical-codes",
        code: "body-weight",
        display: "Body Weight"
      }
    ]
  },
  effectiveDateTime: "2019-03-28",
  valueQuantity: {
    value: 185,
    unit: "lbs",
    system: "http://unitsofmeasure.org",
    code: "[lb_av]"
  }
}
) {
    id
    resourceType
    effectiveDateTime
}
}

Mutation Delete Observation

mutation ObservationRemove {
    ObservationRemove(id: "5dcc015778507e0ad027830d") {
      id  
    }
}
Clone this wiki locally