240 likes | 402 Views
RK. API. // Called by WTM to get ID of the nurse who is responsible for the specified patient BOOL RKGetNurseOnService ( IN LPWSTR SpecifiedPatientID , IN HANDLE OutResultQueue ); OUT LPWSTR NurseID // Called by SM to get the patient list whom the nurse is responsible for
E N D
API • // Called by WTM to get ID of the nurse who is responsible for the specified patient • BOOL RKGetNurseOnService (INLPWSTR SpecifiedPatientID , IN HANDLE OutResultQueue); • OUT LPWSTR NurseID • // Called by SM to get the patient list whom the nurse is responsible for • BOOL RKGetPatientList (INLPWSTR SpecifiedNurseID , IN HANDLE OutResultQueue); • OUT LIST_ENTRY *PatientListHead • // Called by SM to get the prescription for the specified patient • BOOL RKGetPrescription (INLPWSTR SpecifiedPatientID , IN HANDLE OutResultQueue); • OUT PRESCRIPTION Prescription • // Called by LIM to get the relation between medication & cabinet location • BOOL MRKGetRelationBetweenMedicationCabinet(IN HANDLE OutResultQueue); • OUT LOCATION Location
Function • //get initial data including nurse list , patient list , prescription , frequency , and schedule event in the ward (medication location?) • GetinitialData() • //get the nurse list in the ward • GetNurseList() • //get the patient list in the ward • GetPatientList() • //save the schedule event at server side • SaveScheduleEvent() • //get prescription which is changed • GetPrescriptionChanged()
MUMS RK Request Packet Request Type 1 byte TypedefenumMUMSRKPacketType { GetPatientListType, GetNurseListType, GetFrequencyType, GetPrescriptionType, GetPrescriptionChangedType, SaveScheduleEventType, MaxMUMSRKPacketType }
Get Patient List Request Packet Request Type 1 byte
Get Patient List Response Packet Patient 1 … Patient n #Patient Request Type 292 byte … 292 byte 1 byte 1 byte ChineseGivenName ChineseLastName EnglishGivenName EnglishLastName Birth Patient ID 16 byte 128 byte 64 byte 36 byte 32 bytes 16 byte
Get Nurse List Request Packet Request Type 1 byte
Get Nurse List Response Packet Nurse 1 … Nurse n #Nurse Request Type 292 byte … 292 byte 1 byte 1 byte ChineseGivenName ChineseLastName EnglishGivenName EnglishLastName Birth Patient ID 16 byte 128 byte 64 byte 36 byte 32 bytes 16 byte
Get Frequency Request Type Request Type 1 byte
Get Prescription Request Packet Request Type 1 byte
Get Prescription Response Packet Request Type Time stamp 1 byte 8 byte
Prescription changed request packet Request Type Time stamp 1 byte 8 byte
Prescription changed response packet …. CreationTime #Prescription MedicationCode Dosage EndTime PrescriptionStatus StartTime Prescription 1 Prescription ID Request Type Time stamp Patient ID Prescription n 1 bytes 4 bytes 4 bytes …. 648 bytes 824 bytes 32 bytes 4 bytes 4 bytes 64 bytes 64 byte 8 byte 1 byte 824 bytes
Save the schedule event at server side Schedule event n Schedule event 1 Request Type … ReminderTimeBefore Event ID Hospital given ID # schedule event Schedule even t type Schedule event status Creation time DefaultExpectedExecutionTime ExpectedExecutionTime ReminderTimeAfter Prescription ID 236 byte 64 byte 4 byte … 4 byte 4 byte 4 byte 4 byte 1 byte 4 byte 1 byte 80 byte 4 byte 236 byte 64 byte
MUMS MUMS server server GetInitialData() MUMS MUMS MeMDAS Server RK RK WTM MUMSstartup Request Initial Data - Parse request • Query database nurse list • patient list prescription schedule event frequency table Reply Initial Data - Parse reply • link the structures • nurse list • patient list prescription schedule event frequency table Set Initial Data -Produce shifts
MUMS MUMS server server GetPrescriptionChanged() MUMS MUMS MeMDAS Server RK RK WTM Timer alarm Request prescription changed - Parse request time stamp • Use time stamp to determine any prescription changed Reply prescription changed • Parse reply prescription time stamp • save the time stamp Set prescription changed -change prescription
MUMS MUMS server server SaveScheduleEvent() MUMS MUMS MeMDAS Server RK RK WTM Timer alarm - Produce schedule event - Check any schedule event is dirty Transfer schedule event - Parse request Schedule event • Save schedule event
MUMS MUMS server server GetNurseList MUMS MUMS MeMDAS Server RK RK SM Update nurse list manully Request the nurse list for specified ward Request the nurse list for specified ward - Parse requestwardID • Query database Get nurse list for specified ward Reply the nurse the nurse list for specified ward - Parse replynurse list
MUMS MUMS server server GetPatientList MUMS MUMS MeMDAS Server RK RK SM Update nurse list manully Request the patient list for specified ward Request the patient list for specified ward - Parse requestwardID • Query database Get patient list for specified ward Reply the nurse the patient list for specified ward - Parse replypatient list
MUMS MUMS server server RKGetNurseOnService() MUMS MUMS MeMDAS Server RK RK WTM Medication time is expired Request the nurse who is on service for specified patient Request the nurse who is on service for specified patient - Parse request Patient ID • Query database Get nurse on service for specified patient Reply the nurse who is on service for specified patient - Parse replyNurseID Reply the nurse who is on service for specified patient
MUMS MUMS server server RKGetPatientList() MUMS MUMS MeMDAS Server RK RK SM Medication preparation Request the patient list whom the nurse is responsible for Request the patient list whom the nurse is responsible for - Parse request • Query database Get patient list for nurse Reply the patient list whom the nurse is responsible for - Parse reply patient list Reply the patient list whom the nurse is responsible for -Display patient list
MUMS MUMS server server RKGetPrescription() MUMS MUMS MeMDAS Server RK RK SM Select one patient to prepare medication Request prescription for specified patient - Search the prescription for specified patient Reply prescription for specified patient