...
- Visit: encompasses one or more encounters to describe an event where the patient has interacted with the healthcare system. Visits may occur within minutes/hours or may extend over days, weeks, or even months (for an extended hospitalization). Examples of visits include an outpatient (clinic) visit, a hospitalization, or a visit to the lab. In many cases, the patient is physically present; however, this might not always be the case: in the case of a telephone "visit" the physician calls the patient and writes a note and/or some orders as a result; for a documentation "visit" the provider may simply be writing some orders based on labs received between clinic visits. For billing-related systems, the "visit" is typically where the account number would fit.
- Encounter: is a "clinical transaction" in which a group of data (e.g., observations, notes, and orders) are recorded. Encounters generally happen at a point in time and involve one (or a few) providers. Examples include the paper "encounter form" with which OpenMRS started, an order entry session, a daily note & associated orders written for patient while they are in the hospital, etc.
- Visit type: represents the assortment of visits available to an implementation. These could include items like "Initial HIV Clinic Visit", "Return TB Clinic Visit", and "Hospitalization".
- Visit "class": allows for categorization of visit types into INPATIENT vs. OUTPATIENT vs. EMERGENCY. The intent of this is to provide something similar to HL7's PV1-2 "Patient Class" (see codes in Notes)
Classes / API
Code Block | ||
---|---|---|
| ||
Visit (implements OpenmrsData) Integer visitId (required, primary key) Patient patient (required) Location location Date startDatetime (required) Date endDatetime Concept indication // defined by implementer (chief complaint, admission diagnosis, billing code, ...) VisitType visitType (required) VisitType Integer visitTypeId (required, primary key) name, etc (from OpenmrsMetadata) VisitTypeClass visitTypeClass (required) VisitTypeClass = enum (INPATIENT, OUTPATIENT, EMERGENCY, TELEPHONE, ...) inner class in VisitType + encounter.visit_id references visit (can be null) |
The API needs:
Code Block | ||||
---|---|---|---|---|
| ||||
/* Return visit for encounter. May be null. */ Visit getVisit(); EncounterService |
Code Block | ||||
---|---|---|---|---|
| ||||
/* Returns all encounters grouped within a given visit */ List<Encounter> getEncountersByVisit(Visit); /* Include visits as a parameter in search for encounters */ List<Encounter> getEncounters(..., List<Visit>) ??? VisitService ; |
Code Block | ||||
---|---|---|---|---|
| ||||
List<Visit> getAllVisits(); List<Visit> getVisits(VisitType, Collection<Patient>, Collection<Location>, Date minStartDatetime, Date maxStartDatetime, Date minEndDatetime, Date maxEndDatetime, Collection<Concept> startReasons, Collection<Concept> endReasons); List<Visit> getVisitsByPatient(Patient); /* Returns visits with startDatetime in the past and endDatetime in the future or undefined */ List<Visit> getVisitsByPatientgetActiveVisitsByPatient(Patient); |
Gliffy | ||||||||
---|---|---|---|---|---|---|---|---|
|
...