Download præsentationen
Præsentation er lastning. Vent venligst
Offentliggjort afAda Lindegaard Redigeret for ca. et år siden
1
VITAL SIGNS ALARM SYSTEM AfSøren Gørtz Olesen Jonas Hove Jakobsen
2
Indhold i præsentationen Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel 2
3
Systemoversigt Primær læge Sekundær læge Patient Overvåger livstegn 3
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. 4
5
Krav til systemet (2) 5 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 6 √ √
7
Klassediagram (1) 7 World/Environment Eksisterende system Alarmsystemet
8
Klassediagram (2) 8 Det eksisterende overvågningssystem
9
Klassediagram (3) 9
10
Klassediagram (4) 10 World/Environment
11
Klassediagram (5) 11
12
Klassediagram (6) 12 Alarmsystem
13
Indhold i præsentationen Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel 13 √ √ √
14
Udvalgt VDM++ eksempel 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 Hospitalsklassen
15
Indhold i præsentationen Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel Udvalgt funktionalitet fra modellen Test af modellen 15 √ √ √ √
16
Funktionalitet fra modellen (1)
17
Funktionalitet fra modellen (2) 17 AlarmSystem – checkForAlarm() 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) 18 AlarmSystem – step() 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) 19 Alarm – checkForDoctorTimeOut() public checkForDoctorTimeOut : () ==> bool checkForDoctorTimeOut() == ( if not accepted then return World`timeNotionRef.getTime() > Hospital`alarmSystem.doctorAlarmTimeOut + startTime else return false; );
20
Funktionalitet fra modellen (5) 20 Alarm – findNextDoctor() 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 Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel Udvalgt funktionalitet fra modellen Test af modellen 21 √ √ √ √ √
22
Test af modellen (1) 22 Test – instance variables og print() 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", {, }); v1 : Patient`VitalSign := mk_Patient`VitalSign(, 130); v2 : Patient`VitalSign := mk_Patient`VitalSign(, 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) 23 Test – Constructor public Test : () ==> Test Test() == ( hospital.init({d1, d2},{2803831915 |-> pai1}, {2803831915 |-> p1}); p1.setCurrentVitalSign(mk_Patient`VitalSign(, 140)); hospital.vitalSignSurveillanceSystem.step(); print("Number of alarms: " ^ [Hospital`alarmSystem.numOfAlarms()]); Hospital`alarmSystem.step(); World‘timeNotionRef.stepTime(); ); end Test
24
Indhold i præsentationen Systemoversigt Krav til systemet Klassediagram Udvalgt VDM++ eksempel Udvalgt funktionalitet fra modellen Test af modellen 24 √ √ √ √ √ √
25
25 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 Environment 1/2
26
26 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 Environment 2/2
27
27 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 Hospital
28
28 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 Doctor
29
29 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 VitalSignSurveillanceSystem
Lignende præsentationer
© 2024 SlidePlayer.dk Inc.
All rights reserved.