1 / 29

Vital Signs Alarm System

Vital Signs Alarm System. Af Søren Gørtz Olesen Jonas Hove Jakobsen. Indhold i præsentationen. 2. Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel. Systemoversigt. Overvåger livstegn. Sekundær læge. Patient. Primær læge. Krav til systemet (1).

oria
Télécharger la présentation

Vital Signs Alarm System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Vital SignsAlarm System Af Søren Gørtz Olesen Jonas Hove Jakobsen

  2. Indhold i præsentationen 2 Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel

  3. Systemoversigt Overvåger livstegn Sekundær læge Patient Primær læge

  4. Krav til systemet (1) • Systemet skal kunne overvåge livstegn fra en patient og alarmere ved overskridelse af grænseværdier. • Livstegnene består af puls, EKG, åndedræt, blodtryk og temperatur. • En alarm skal indeholde informationer om hvilket/hvilke livstegn der er kritiske, hvor meget grænseværdien er overskredet og hvor lang tid den har været overskredet. • Hvis grænseværdien for et livstegn overskrides i 15 sek. skal en alarm genereres hos første prioriterede læge. Lægen skal kvittere for alarmen inden 30 sek. ellers skal alarmen videresendes til anden prioriterede læge.

  5. Krav til systemet (2) • Hvis ingen læge har kvitteret for alarmen indenfor 60 sek. skal en fællesalarm lyde hos alle afdelingens læger. • Alarmgrænseværdierne og tidsgrænser skal kunne indstilles individuelt for hver patient. • En prioriteringsrækkefølge af læger skal kunne tilknyttes en patient. En patient skal have tilknyttet minimum en første og en anden prioritet. • En læge skal kunne afmelde sig alarmhåndtering, så alarmer videresendes til den næste læge i prioriteringsrækkefølgen. Fællesalarmer skal lyde under alle omstændigheder.

  6. Indhold i præsentationen • Systemoversigt • Krav til systemet • Klassediagram • Udvalgt VDM++ eksempel √ √

  7. Klassediagram (1) Alarmsystemet Eksisterende system World/Environment

  8. Klassediagram (2) Det eksisterende overvågningssystem

  9. Klassediagram (3) 9

  10. Klassediagram (4) World/Environment

  11. Klassediagram (5) 11

  12. Klassediagram (6) Alarmsystem

  13. Indhold i præsentationen 13 √ √ √ Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel

  14. Udvalgt VDM++ eksempel Hospitalsklassen 14 class Hospital types public CPRNo = int; public String = seq of char; instance variables public static doctors : set of Doctor; public static patientAlarmInfoMap : map CPRNo to PatientAlarmInfo; public static patientMap : map CPRNo to Patient; private vitalSignSurveillanceSystem : VitalSignSurveillanceSystem; public static alarmSystem : AlarmSystem; inv dom patientAlarmInfoMap = dom patientMap; operations public Hospital : () ==> Hospital Hospital() == is not yet specified; end Hospital

  15. Indhold i præsentationen 15 √ √ √ √ Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel Udvalgt funktionalitet fra modellen Test af modellen

  16. Funktionalitet fra modellen (1)

  17. Funktionalitet fra modellen (2) AlarmSystem – checkForAlarm() 17 public checkForAlarm : Hospital`CPRNo ==> () checkForAlarm(PatientCPRNo) == ( let vitalSigns = Hospital`patientMap(PatientCPRNo).getCurrentVitalSigns(), thresholds = Hospital`patientAlarmInfoMap(PatientCPRNo).getThresholds() in let criticalVitalSigns = {mk_AlarmVitalSign(v.type, v.val, t.val) | v in set vitalSigns, t in set thresholds & v.type = t.type and v.val > t.val} in ( if card criticalVitalSigns > 0 and (not exists a in set alarms & a.getPatientcprno() = PatientCPRNo) then ( dcl alarm :Alarm := new Alarm(PatientCPRNo, criticalVitalSigns); alarms := alarms union {alarm}; let doctor = alarm.findNextDoctor() in if doctor <> nil then doctor.alarmDoctor(alarm) else alarmAllDoctors(alarm); ) ) ) pre {v.type | v in set Hospital`patientMap(PatientCPRNo).getCurrentVitalSigns()} = {t.type | t in set Hospital`patientAlarmInfoMap(PatientCPRNo).getThresholds()};

  18. Funktionalitet fra modellen (3) AlarmSystem – step() 18 public step : () ==> () step() == ( for all a in set {al | al in set alarms & not al.isFinished()} do if a.checkForDoctorTimeOut() then let doctor = a.findNextDoctor() in if doctor <> nil then ( a.setStartTime(World`timeNotionRef.getTime()); doctor.alarmDoctor(a); ) else alarmAllDoctors(a); );

  19. Funktionalitet fra modellen (4) Alarm – checkForDoctorTimeOut() 19 public checkForDoctorTimeOut : () ==> bool checkForDoctorTimeOut() == ( if not accepted then return World`timeNotionRef.getTime() > Hospital`alarmSystem.doctorAlarmTimeOut + startTime else return false; );

  20. Funktionalitet fra modellen (5) Alarm – findNextDoctor() 20 public findNextDoctor : () ==> [Doctor] findNextDoctor() == ( doctorPriority := doctorPriority + 1; if doctorPriority > len (Hospital`patientAlarmInfoMap(patientcprno).getResponsibleDoctors()) then return nil else let respDoctors = Hospital`patientAlarmInfoMap(patientcprno).getResponsibleDoctors()in ( if respDoctors(doctorPriority).getAvailability() = false then findNextDoctor() else return respDoctors(doctorPriority); ) );

  21. Indhold i præsentationen 21 √ √ √ √ √ Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel Udvalgt funktionalitet fra modellen Test af modellen

  22. Test af modellen (1) Test – instance variables og print() 22 class Test instance variables io : IO := new IO(); public hospital : Hospital := new Hospital(); d1 : Doctor := new Doctor("Soren", 1); d2 : Doctor := new Doctor("Jones", 2); p1 : Patient := new Patient("Jonas Hove", {<HeartRate>,<Temperature>}); v1 : Patient`VitalSign := mk_Patient`VitalSign(<HeartRate>, 130); v2 : Patient`VitalSign := mk_Patient`VitalSign(<Temperature>, 39); pai1 : PatientAlarmInfo := new PatientAlarmInfo([d1, d2], {v1, v2}); operations public static print : seq of char ==> () print(str) == def - = io.writeval[seq of char](str) in skip;

  23. Test af modellen (2) Test – Constructor 23 public Test : () ==> Test Test() == ( hospital.init({d1, d2},{2803831915 |-> pai1}, {2803831915 |-> p1}); p1.setCurrentVitalSign(mk_Patient`VitalSign(<HeartRate>, 140)); hospital.vitalSignSurveillanceSystem.step(); print("Number of alarms: " ^ [Hospital`alarmSystem.numOfAlarms()]); Hospital`alarmSystem.step(); World‘timeNotionRef.stepTime(); ); end Test

  24. Indhold i præsentationen 24 √ √ √ √ √ √ Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel Udvalgt funktionalitet fra modellen Test af modellen

  25. Environment 1/2 class Environment … operations public Environment : String * String ==> Environment Environment(patientFile, doctorFile) == ( def mk_ (-,input) = io.freadval[seq of Patientline](patientFile) in inlinesPatient := input; def mk_ (-,input) = io.freadval[seq of Doctorline](doctorFile) in inlinesDoctor := input; hospital := new Hospital(); ); public run : () ==> () run () == ( while not (isFinished() and Hospital`alarmSystem.isFinished()) do ( createSignal(); hospital.vitalSignSurveillanceSystem.step(); Hospital`alarmSystem.step(); World‘timeNotionRef.stepTime(); ); showResult() ); … end Environment 25

  26. Environment 2/2 class Environment … private createSignal: () ==> () createSignal () == ( dcl curtime : nat := World‘timeNotionRef.getTime(); if len inlinesDoctor > 0 then ( def mk_(doctorID, patientCPRNo, accept, deactivate, runtime) = hd inlinesDoctor in if runtime <= curtime then ( if accept = true then doctorIO.acceptAlarm(doctorID, patientCPRNo); if deactivate = true then doctorIO.deactivateAlarm(doctorID, patientCPRNo); inlinesDoctor := tl inlinesDoctor; ) ); if len inlinesPatient > 0 then ( def mk_(patientCPRNo, vitalSigns, runtime) = hd inlinesPatient in if runtime <= curtime then ( patientIO.setVitalSigns(vitalSigns, patientCPRNo); inlinesPatient := tl inlinesPatient; ) ) ); … end Environment 26

  27. Hospital class Hospital … operations public init : set of Doctor * map CPRNo to PatientAlarmInfo * map CPRNo to Patient ==> () init(docs, paiMap, pMap) == ( doctors := docs; atomic ( patientAlarmInfoMap := paiMap; patientMap := pMap; ); vitalSignSurveillanceSystem.init(pMap); ); public Hospital : () ==> Hospital Hospital() == vitalSignSurveillanceSystem := new VitalSignSurveillanceSystem(); … end Hospital 27

  28. Doctor class Doctor … operations public getID : () ==> int getID() == return doctorID; public alarmDoctor : Alarm ==> () alarmDoctor(alarm) == World`env.handleEvent(doctorName, alarm.getPatientcprno()); public acceptAlarm : Hospital`CPRNo ==> () acceptAlarm(cprno) == available := not (Hospital`alarmSystem.acceptAlarm(cprno)); public deactivateAlarm : Hospital`CPRNo ==> () deactivateAlarm(cprno) == ( Hospital`alarmSystem.deactivateAlarm(cprno); available := true; ); end Doctor 28

  29. VitalSignSurveillanceSystem class VitalSignSurveillanceSystem instance variables public patientMap : map Hospital`CPRNo to Patient; inv dom patientMap = dom Hospital`patientMap; operations public step : () ==> () step() == monitorPatients(); public monitorPatients : () ==> () monitorPatients() == for all cprno in set dom patientMap do Hospital`alarmSystem.checkForAlarm(cprno); public init : map Hospital`CPRNo to Patient ==> () init(patMap) == patientMap := patMap; end VitalSignSurveillanceSystem 29

More Related