Searching for a patient

GET https://tw171.open.allscripts.com/FHIR/Patient?given=Allison  
GET https://tw171.open.allscripts.com/FHIR/Patient?given=Allison&gender=female 
GET https://tw171.open.allscripts.com/FHIR/Patient?given=Allison&gender=female&birthdate=1973-03-05

The following parameters are specified in the search query:

Name Required? Type Description
name No string Portion of either the family or given name of the patient.
_id No string Logical ID of the patient.
family No string Portion of the family (last) name of the patient.
given No string Portion of the given (first) name of the patient.
gender No token Patient’s gender. For more information on this value set, see Administrative Gender ValueSet.
birthdate No date Patient’s date of birth.
identifier No token Patient’s identifier. For example, MRN.

The response is similar to the following:

{
"resourceType": "Bundle",
"type": "searchset",
"entry":[
    {
        "resource":{"resourceType": "Patient", "id": "47675", "language": "", "text":{"status": "generated",…}
    },
    {
        "resource":{"resourceType": "Patient", "id": "1556", "language": "", "text":{"status": "generated",…}
    },
    {
        "resource":{"resourceType": "Patient", "id": "27190", "language": "", "text":{"status": "generated",…}
    },
    {
        "resource":{"resourceType": "Patient", "id": "36530", "language": "", "text":{"status": "generated",…}
    }
]}

Searching for a patient ID

A patient ID can be used to query for additional information. The search function is described in the previous section.

If the response returns one or more patients, the response contains the patient ID (or patient IDs).

{ “resourceType”: “Bundle”, “type”: “searchset”, “entry”:[ { “resource”:{“resourceType”: “Patient”, “id”:“47675”, “language”: “”, “text”:{“status”: “generated”,…} } ]}

You can use the highlighted ID (47675 in this example) in subsequent requests.

Retrieving a patient

The patient’s logical ID used to retrieve the patient is passed as part of the URL. The logical ID is found as the result of a search.

GET https://tw171.open.allscripts.com/FHIR/Patient/id
Name Required? Type Description
id yes URL Patient’s logical ID. This is retrieved using the search function.

A DAF Patient is returned.

The following table describes the information returned for an individual or animal receiving health care services:

Name Type Cardinality Description
identifier Identifier 0..* Patient’s identifier. Patients are usually assigned a specific numerical identifier that is unique within the system.
active boolean 0..1 Is the patient’s record active? The default value is true. Need to be able to mark a patient record as not to be used because it was created in error. If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient.
name HumanName 0..* Name associated with the patient.
telecom ContactPoint 0..* Patient contact communication detail. This indicates the value in any kind of telecom details field for the patient. If capturing a phone, fax, or similar contact point, the value is a properly formatted telephone number according to ITU-T E.123. However, this is frequently not possible due to legacy data and/or clerical practices when recording contact details. For this reason, phone, fax, page, and email addresses are not handled as formal URLs.
gender code 0..1 Patient’s gender. Returns Male, Female, Other, or Unknown. For more information on this value set, see Administrative Gender ValueSet.
birthDate date 0..1 Patient’s date of birth. This indicates a specific calendar date or partial date (either a year or a month and year combination). Time zone is not included. Fuzzy (approximate) dates are not valid.
deceasedBoolean boolean 0..1 Is the patient deceased? If a patient is deceased, it influences the clinical process and human communication. If this value is blank, most systems interpret the missing information as an indication that the patient is alive.
address Address 0..* Patient’s postal address. Postal addresses are often used to record a location that can be visited to find a patient or person.
maritalStatus CodeableConcept 0..1 Patient marital (civil) status. For more information on this value set, see Marital Status Codes.
multipleBirthBoolean boolean 0..1 Was the patient part of a multiple birth?
contact 0..* Patient’s contact party. For example, Guardian, Partner, or Friend).
– contact.relationship CodeableConcept 0..* Patient contact’s relationship with the patient. For more information on this value set, see patient-contact-relationship.
– contact.name HumanName 0..1 Patient contact’s name.
– contact.telecom ContactPoint 0..* Patient contact’s detailed information.
– contact.address Address 0..1 Patient contact’s address.
communication.language CodeableConcept 0..* Language used to communicate with the patient about his or her health. For more information on this value set, see Language ValueSet.
careProvider Reference(Practitioner) 0..* Patient’s nominated primary care provider.
us-core-race CodeableConcept 0..1 Patient’s race (category of humans sharing history, origin, or nationality). For more information on this value set, see DAF Race ValueSet</a.
us-core-ethnicitye CodeableConcept 0..1 Patient’s ethnicity (category of humans sharing heritage). For more information on this value set, see Ethnicity group.
us-core-religion CodeableConcept 0..1 Patient’s professed religious affiliation. For more information on this value set, see v3 Code System ReligiousAffiliation.
{
   "resourceType": "Bundle",
   "type": "searchset",
   "entry": [{"resource":    {
      "resourceType": "Patient",
      "id": "19",
      "extension":       [
                  {
            "url": "http://hl7.org/fhir/StructureDefinition/us-core-race",
            "valueCodeableConcept": {"coding": [            {
               "system": "OBM",
               "code": "0",
               "display": " "
            }]}
         },
                  {
            "url": "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity",
            "valueCodeableConcept": {"coding": [            {
               "system": "OBM",
               "code": "0",
               "display": ""
            }]}
         },
                  {
            "url": "http://hl7.org/fhir/StructureDefinition/us-core-religion",
            "valueCodeableConcept": {"coding": [            {
               "code": "          ",
               "display": " "
            }]}
         }
      ],
      "identifier": [      {
         "type":          {
            "coding":             [
                              {
                  "code": "ZZZTW01",
                  "display": "ZZZTW01",
                  "userSelected": false
               },
                              {
                  "code": "4         ",
                  "display": "Other",
                  "userSelected": false
               }
            ],
            "text": "TouchWorks MRN"
         },
         "system": "dummy identifier system",
         "value": "ZZZTW01",
         "assigner": {"reference": "Organization/3"}
      }],
      "active": true,
      "name": [      {
         "text": "Allscripts,Allison ",
         "family": ["Allscripts"],
         "given": ["Allison"],
         "prefix": ["     "],
         "suffix": ["     "]
      }],
      "telecom":       [
                  {
            "system": "phone",
            "value": "(312) 555-1112",
            "use": "home"
         },
                  {
            "system": "phone",
            "value": "(847) 608-3515x4357 ",
            "use": "work"
         },
                  {
            "system": "fax",
            "value": "(708) 555-1001"
         },
                  {
            "system": "email",
            "value": "allison@allscripts.com"
         }
      ],
      "gender": "female",
      "birthDate": "1973-03-05",
      "deceasedBoolean": false,
      "address": [      {
         "text": "34 Smith Mt. Road. Apartment 1 Springfield IL 60654      USA",
         "line":          [
            "34 Smith Mt. Road.",
            "Apartment 1"
         ],
         "city": "Springfield",
         "state": "IL",
         "postalCode": "60654     ",
         "country": "USA"
      }],
      "maritalStatus": {"coding": [      {
         "system": "http://hl7.org/fhir/v3/vs/MaritalStatus",
         "code": "W",
         "display": "Widowed"
      }]},
      "multipleBirthBoolean": false,
      "contact":       [
                  {
            "relationship": [{"coding": [            {
               "code": "4         ",
               "display": "Other"
            }]}],
            "name":             {
               "text": "Washington George",
               "family": ["Washington"],
               "given": ["George"]
            },
            "telecom":             [
                              {
                  "system": "other",
                  "value": "(312) 555-1101",
                  "use": "home"
               },
                              {
                  "system": "other",
                  "value": "(773) 555-1201x1101",
                  "use": "work"
               }
            ],
            "address":             {
               "line":                [
                  "123 Waulnut Street",
                  "Apartment 2E"
               ],
               "city": "dummy address city",
               "state": "dummy address state",
               "postalCode": "dummy address postal code",
               "country": "dummy address country"
            }
         },
                  {
            "relationship": [{"coding": [            {
               "code": "4         ",
               "display": "Other"
            }]}],
            "name":             {
               "text": "Adams Abigail",
               "family": ["Adams"],
               "given": ["Abigail"]
            },
            "telecom":             [
                              {
                  "system": "other",
                  "value": "(312) 555-7701x8850",
                  "use": "work"
               },
                              {
                  "system": "other",
                  "value": "(847) 555-9901",
                  "use": "home"
               }
            ],
            "address":             {
               "line":                [
                  "123 Main Street",
                  "Apartment 41"
               ],
               "city": "dummy address city",
               "state": "dummy address state",
               "postalCode": "dummy address postal code",
               "country": "dummy address country"
            }
         }
      ],
      "communication": [{"language": {"coding": [      {
         "system": "ISO-639-2",
         "code": "eng       ",
         "display": "English"
      }]}}],
      "careProvider": [      {
         "reference": "Practitioner/53",
         "display": "Allscripts,Family Medicine "
      }]
   }}]
}