#Smoking status

Retrieving a patient’s observations

The patient’s logical ID is passed as part of the URL. The logical ID is returned using the search function.

GET https://tw171.open.allscripts.com/FHIR/Patient/id/Observation?code=72166-2
GET https://tw171.open.allscripts.comFHIR/Patient/id/Observation?code=72166-2&date=eq2016-01-01
Name Required? Type Description
ID yes URL Patient’s logical ID. This is retrieved using the search function.
date no string A string representing a date to include in the search. See below for more information.

Smoking status is returned in a DAF observation. The actual smoking status is returned in valueCodeableConcept.

Name Type Cardinality Description
identifier 0..* Observation’s unique ID. This applies to the instance observation.
status code 1..1 Observation’s status. Values include Registered, Preliminary, Final, or Amended. For more information on this value set, see observation-status.
category CodeableConcept 0..1 Observation’s type of classification. For more information on this value set, see observation-category.
code CodeableConcept 1..1 Observation’s type or code. For more information on this value set, see observation-codes.
subject Reference(Patient, Group, Device, Location) 0..1 Observation’s subject. The patient’s (or group of patients) location, or the device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.
encounter Reference(Encounter) 0..1 Observation’s encounter. The healthcare event (a patient and healthcare provider interaction) during which the observation is made. For some observations it may be important to know the link between an observation and a particular encounter.
effectiveDateTime dateTime 0..1 Clinically relevant time/time-period for observation.
effectivePeriod Period 0..1 Clinically relevant time/time-period for the observation. The time or time-period the observed value is asserted as being true. For biological subjects (human patients) this is usually called the “physiologically relevant time.” This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.
issued Hl7.Fhir.Model.Instant 0..1 Date/time the observation was made available. The date and time is typically after the results have been reviewed and verified.
performer Reference(Practitioner, Organization, Patient, RelatedPerson) 0..* Individual responsible for the observation.
valueCodeableConcept CodeableConcept 0..1 The smoking status. Need to track the status of individual results. Some results are finalized before the whole report is finalized. For more information on this value set, see DAF Smoking Status Value Set.
comments string 0..1 Comments about the result.

Searching by date

Dates are passed as query parameters on the URL. Since the URL parameters cannot handle comparators (for example, >, <=) these are passed in as part of the date.

date=eq2016-01-01
date=gt2016-01-01

The following comparators are supported:

Comparator Description
eq equal
gt greater than
ge greater than or equal
lt less than
le less than or equal

To search for a date range, pass in the date twice.

e.g. date=ge2010-01-01&date=le2010-12-31

This search would include every day in the year 2010.