Skip to content

Instantly share code, notes, and snippets.

@vagmi
Forked from healthhiway/Queries
Created December 27, 2010 09:35
Show Gist options
  • Save vagmi/755995 to your computer and use it in GitHub Desktop.
Save vagmi/755995 to your computer and use it in GitHub Desktop.
Patient Model (Demographics)
----------------------------
UHID: String
First Name: String
Middle Name: String
Last Name: String
Gender: Boolean
DOB: Date
Address: String
City: String
State: String
Pincode: String
Email: String
Phone: String
Mobile: String
Registration Date: Date
Referred Doctor ID: String
Doctor Model
------------
Name: String
Speciality: String
Address: String
Phone: String
Email: String
Mobile: String
DoctorID: String (As it exists in the HIS)
Numeric Test Result
-------------------
Name: String
Prescribed By: Doctor
For : Patient
Encounter ID: String (This is the lab regno)
Result Date: Date
Value: double
Unit: String
Max Value: double
Min Value: double
Textual Test Result (includes profiles and special tests)
-------------------
Name: String
Prescribed By: Doctor
For : Patient
Encounter ID: String (This is the lab regno)
Result Date: Date
Observation: String (lots of string. May be RTF in certain cases)
Procedure Model
---------------
Name: String
Code: String
Doctor ID: String
Procedure Date: Date
Referred By: Doctor
Encounter ID: String (IP No)
Discharge Summary
-----------------
Admission Date: Date
Discharge Date: Date
Summary: String
Encounter ID: String
1) For a given UHID, I want the details in the Patient model as above
2) For a given UHID, I want a list of Textual and Numeric Results (Profiles and Special are also a part of the texual result)
3) For a given UHID, I want a list of Textual and Numeric Results, since a given Result Date
4) For a given UHID, get a list of encounters
5) For a given UHID, get a list of encounters since a given date
6) For a given encounter id, get a list of procedures
7) For a given encounter id, get the discharge summary
8) For a given Doctor ID, get me a the details in the doctor model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment