HiMS API Documentation

HIMS FHIR documentation version 1.0


Patient

GET https://fhir-api.hmsfirst.com/r4/Patient

The Patient resource type provides demographic and contact details about the patient in HiMS. This resource covers the “who” about the patient, including name, date of birth, birth sex, gender, and address.

The Patient resource returns data classes and elements defined for Patient Demographics in United States Core Data for Interoperability (USCDI v2) First Name, Last Name, Middle Name, Suffix, Previous Name, Sexual Orientation, Gender Identity, Date of Birth, Race, Ethnicity, Sex (Assigned at Birth), Preferred Language, Current Address, Previous Address, Phone Number, Phone Number Type, and Email Address. Example requests for patient data are shown below:

Get patient by resource ID


curl --request GET \
--url 'https://fhir-api.hmsfirst.com/r4/Patient/{patientId}' \
--header 'Accept: application/fhir+json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Examples:
GET https://fhir-api.hmsfirst.com/r4/Patient/29355
                    

The resource ID can also be used in combination with search parameters using the _id parameter:


curl --request GET \
--url 'https://fhir-api.hmsfirst.com/r4/Patient?_id={patientId}' \
--header 'Accept: application/fhir+json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Examples:
GET https://fhir-api.hmsfirst.com/r4/Patient?_id=29355
                    

Search for patients by name (Patients are searchable by their entire name, or just the given and family parts:)


curl --request GET \
--url 'https://fhir-api.hmsfirst.com/r4/Patient?name={string}' \
--header 'Accept: application/fhir+json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

curl --request GET \
--url 'https://fhir-api.hmsfirst.com/r4/Patient?given={string}' \
--header 'Accept: application/fhir+json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

curl --request GET \
--url 'https://fhir-api.hmsfirst.com/r4/Patient?given={string}' \
--header 'Accept: application/fhir+json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Examples:
GET https://fhir-api.hmsfirst.com/r4/Patient?name=Alex
GET https://fhir-api.hmsfirst.com/r4/Patient?given=Nancy
GET https://fhir-api.hmsfirst.com/r4/Patient?family=Jones
                    

Find using date of birth and patient name (Multiple parameters can be combined to help ensure search result uniqueness.)


curl --request GET \
--url 'https://fhir-api.hmsfirst.com/r4/Patient?name={string}&birthdate={date}' \
--header 'Accept: application/fhir+json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Examples:
GET https://fhir-api.hmsfirst.com/r4/Patient?name=Alex&birthdate=1935-01-08
                    

Response schema


{
  "type": "object",
  "required": [],
  "properties": {
    "resourceType": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "total": {
      "type": "number"
    },
    "link": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [],
        "properties": {
          "relation": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    },
    "entry": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [],
        "properties": {
          "fullUrl": {
            "type": "string"
          },
          "resource": {
            "type": "object",
            "required": [],
            "properties": {
              "resourceType": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "meta": {
                "type": "object",
                "required": [],
                "properties": {
                  "versionId": {
                    "type": "string"
                  },
                  "lastUpdated": {
                    "type": "string"
                  },
                  "profile": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "extension": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "extension": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [],
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "valueCoding": {
                            "type": "object",
                            "required": [],
                            "properties": {
                              "system": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "display": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              },
              "identifier": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "system": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              },
              "active": {
                "type": "boolean"
              },
              "name": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "use": {
                      "type": "string"
                    },
                    "family": {
                      "type": "string"
                    },
                    "given": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "telecom": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "system": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "use": {
                      "type": "string"
                    }
                  }
                }
              },
              "gender": {
                "type": "string"
              },
              "birthDate": {
                "type": "string"
              },
              "address": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "use": {
                      "type": "string"
                    },
                    "line": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "city": {
                      "type": "string"
                    },
                    "district": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "postalCode": {
                      "type": "string"
                    },
                    "period": {
                      "type": "object",
                      "required": [],
                      "properties": {
                        "start": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "maritalStatus": {
                "type": "object",
                "required": [],
                "properties": {
                  "coding": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [],
                      "properties": {
                        "system": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "display": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "text": {
                    "type": "string"
                  }
                }
              },
              "communication": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "language": {
                      "type": "object",
                      "required": [],
                      "properties": {
                        "coding": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [],
                            "properties": {
                              "system": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "display": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "text": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}