HiMS API Documentation

HIMS FHIR documentation version 1.0


Encounter

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

The Encounter Information resource defines the setting where patient care takes place. This includes ambulatory, inpatient, emergency, home health, and virtual encounters.

The Encounter Information resource returns data classes and elements defined for Encounter Information in United States Core Data for Interoperability (USCDI v2) with Encounter Type, Encounter Diagnosis, Encounter Time, Encounter Location, Encounter Disposition. Examples of API requests to retrieve device data are shown below:

Get Encounters related to a specific patient


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

Examples:
GET https://fhir-api.hmsfirst.com/r4/Encounter?patient=29355
                    

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"
                    }
                  }
                }
              },
              "identifier": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "use": {
                      "type": "string"
                    },
                    "system": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              },
              "status": {
                "type": "string"
              },
              "class": {
                "type": "object",
                "required": [],
                "properties": {
                  "system": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                }
              },
              "type": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [],
                        "properties": {
                          "system": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "display": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "subject": {
                "type": "object",
                "required": [],
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "display": {
                    "type": "string"
                  }
                }
              },
              "participant": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "type": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [],
                        "properties": {
                          "coding": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [],
                              "properties": {
                                "system": {
                                  "type": "string"
                                },
                                "code": {
                                  "type": "string"
                                },
                                "display": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "text": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "period": {
                      "type": "object",
                      "required": [],
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "individual": {
                      "type": "object",
                      "required": [],
                      "properties": {
                        "reference": {
                          "type": "string"
                        },
                        "display": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "period": {
                "type": "object",
                "required": [],
                "properties": {
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  }
                }
              },
              "reasonCode": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "coding": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [],
                        "properties": {
                          "system": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "hospitalization": {
                "type": "object",
                "required": [],
                "properties": {
                  "dischargeDisposition": {
                    "type": "object",
                    "required": [],
                    "properties": {
                      "coding": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [],
                          "properties": {
                            "system": {
                              "type": "string"
                            },
                            "code": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "location": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [],
                  "properties": {
                    "location": {
                      "type": "object",
                      "required": [],
                      "properties": {
                        "reference": {
                          "type": "string"
                        },
                        "display": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "serviceProvider": {
                "type": "object",
                "required": [],
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "display": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}