Skip to content

Instantly share code, notes, and snippets.

@healthhiway
Created December 27, 2010 10:07
Show Gist options
  • Save healthhiway/756014 to your computer and use it in GitHub Desktop.
Save healthhiway/756014 to your computer and use it in GitHub Desktop.
PHR models and queries for HiReps
Patient
-------
string uhid
string first_name
string middle_name
string last_name
datetime registration_date
string sex
datetime dob
string address
string city
string state
string pin
string email
string phone
string mobile
string doctor_id (referring doctor id)
Numeric Results
---------------
integer consultant_code
string doctor_name
integer lab_regno (This is the lab id)
string service_code
string service_name
string sub_investigation_name
datetime result_date
float result
float min_value
float max_value
string unit_name
text interpretation
text impression
text remark
string uhid
Textual Results
---------------
string lab_regno (This is the lab id)
string doctor_name
string service_name
string patient_name
text observation
text impression
text interpretation
datetime result_date
string uhid
Procedures
----------
integer code (procedure code)
string name
integer doctor_id
string doctor_name
datetime procedure_date
integer referred_by (Doctor ID)
string referred_doctor_name (Referred doctor name)
string encounter_id
boolean OPDIPD (Boolean true or false)
string uhid
Discharge Summary
-----------------
string encounter_no
datetime admission_date
datetime discharge_date
text discharge_summary
string uhid
Queries needed
--------------
1) Get a list of patients registered since date/time
2) Get a list of numeric test results finalized since date/time
3) Get a list of non-numeric test results finalized since date/time
4) Get a list of procedures performed since date/time
5) Get a list of discharge summaries finalized since date/time
6) Given a UHID, get patient details
7) Given a UHID, get a list of numeric test results finalized
8) Given a UHID, get a list of non-numeric test results finalized
9) Given a UHID, get a list of procedures performed
10) Given a UHID, get a list of discharge summaries available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment