Top Banner
Napa Valley Care Center Database Damla Bayindir Ivette Bigit Robert Dooley Michael Ellison Ashwini Purohit Ma Than Than Thaik Jannat Dena Vaziri
27

Napa Valley Care Center Database

Feb 23, 2016

Download

Documents

karim

Napa Valley Care Center Database. Damla Bayindir Ivette Bigit Robert Dooley Michael Ellison Ashwini Purohit Ma Than Than Thaik Jannat Dena Vaziri. Final Presentation Overview. Client Description Our Goal EER Relational Schema Relational Schema Screenshot Normalization Analysis - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

Napa Valley Care Center Database

Napa Valley Care Center DatabaseDamla BayindirIvette Bigit Robert Dooley Michael EllisonAshwini Purohit Ma Than Than ThaikJannat Dena Vaziri

Final Presentation Overview

Client DescriptionOur GoalEERRelational SchemaRelational Schema ScreenshotNormalization AnalysisQueriesFormsReports

Client DescriptionNapa Valley Care Center is a nursing care center with ~100 employeesFocus on Station 2: rehabilitation and short-term care 43 beds in this sectionAll patient data and forms are currently recorded by hand1000+ records of weekly summariesSchedules of employees and shifts are confusing

Our Goal

Increase the efficiency of the care centerSave the employees timeEliminate errors and inconsistencies in schedulingReduce the number of duplicate charting errorsMake patient health information more consistent, reliable, and accessible to nursesUniversalize all record keeping techniquesPatientEmployeeMedicationInsuranceCompanyRNAperformsBedShiftCNAworksLives inAssigned to(0,N)(1,M)(0,N)(1,N)(1,N)(0,N)(1,1)(0,N)(0,N)Center Assessment Center Prescriptionp, dp, dVisitorvisitsincludesMeal Admin(1,1)(1,1)(1,1)(0,1)(0,N)(0,M)(0,N)(1,N)(1,N)(1,N)AssessmentaboutMedication HistoryObservation Historyp, dPersonalMedication InventoryCenter TreatmentTreatment HistoryusesTreatment Typesincludeshas(0,1)(1,1)(0,N)(1,1)(1,1)(0,N)(0,N)(0,1)(1,1)(0,N)hasPre-existing Medical HistoryPermissiongivesCare Center ActivityperformsLVNRNADLTrained forActivity Typesp, dtimestampIs a type of(1,1)(0,N)(0,N)(1,N)assess(1,N)(1,N)Trained for(1,N)(0,N)t, dIVsNon-IVTrained forTrained for(1,N)(0,N)(1,N)(0,N)External treatment typeTrained forSupplierProvided byhas(General) Inventory item(1,1)(0,N)(1,N)(1,1)ErrorduringDue to(0,N)(1,1)(0,N)(1,N)Procedurest, dhas(0,N)(1,1)uses(1,1)(0,N)(1,N)(0,N)p, dinvolves(0,N)(1,N)RehabTrained for(1,N)(0,N)Medication AdmininvolvesFood Item(1,N)(1,N)Insurance Planfromhas(1,1)(0,N)Relational Schema1.Patient(PSSN, Fname, Lname, PhoneNum, BedID5, PreMID13)2.Employee(ESSN, EmpFName,EmpLName)2a. RN(ESSN2)2b. LVN(ESSN2)2c. RNA(ESSN2)2d. CNA(ESSN2)3. Visitor(VID, Vfname, Vlname)4.Permission(PID,PermissionName, Description)5.Bed(BedID, RoomNum, XCoord, YCoord)6.PatientInsurance (PSSN1, PlanID36, MemberID)7.Shift(ShiftID, ShiftName, StartTime, EndTime)8.Error( ErrorID,ShiftID7,ErrorName,ErrorDescription)9.Supplier(SupID,SupName,Contact)10. Procedures(ProcedID) 10a. ExternalTreatmentType(ProcedID10, ExternalName,ExternalDescription)

Relational Schema (cont.) 10b. Non-IV(ActID11,NonlVName, Description) 10c. IV(ActID11,IVname,Description)11.Activity Types(ActID,ActName,ActDescription)11a. ADL(ActID11,ADLName,ADLDescription) 11b. Assessment(ActID,AssessName,AssessDescription) 11c. Treatment Types(ActID11 ,ProcedID10, ProcedID, TreatmentName, TreatmentDescription) 11d. Meal Admin(AdminMealID,ActID11,TimeServed) 11e. Rehab(RehabID,RehabName,RehabDescription) 11f. Medication Admin(AdminMID,ActID11,MedID14)12. Care Center Activity(ActID,PSSN1,ESSN2,CCDate, CCName,CCDesc,) 12a. Center Treatment(ActID,PSSN1,ESSN2,CCDate,TTID11c, ProcedID,MedID14)

12b. Center Prescription (ActID,PSSN1,ESSN2,CCDate ,MedID14,TTID11c) 12c. Center Assessment(ActID,PSSN1,ESSN2,CCDate,Scale (1-10)) 13. Pre-existing Medical History (PSSN1)13a. Observation History(PSSN1,ObsDate,ObsDescription)13b. Treatment History(PSSN1,ProcedID10,TreatmentName, TreatmentDescription,TTID11c,AID ) 13c. Medication History(PSSN1,MedID13 MedDate,Medication) 14. Medication(MedID,MedName,Dosage, Frequency,SupID9, LeadTime,InterestRate,UnitCostSetupCost,Demand)15. General Inventory Item(MedID14, InvName,InvType,CurrentInventory) 16. Food Item(FoodID,FoodName,FoodCalories) 17. PersonMedicationInventory(MedID14,PSSN1,Quantity)18.EmployeeJunctionShift(ShiftID7,ESSN2) 19.BedjuctionShift(BedID5,ShiftID7) 20.BedAssessShift(BedID5,ShiftID7,Assessment )

Relational Schema (cont.)

8

Relational Schema (cont.)21.GivesPermission(PID4,PSSN1, PerDate, Acc/Rej) 23.ErrorJunctionEmp(ErrorID8,ESSN2)24.PatVisJunc(VID3,PSSN1,VMonth, VDay,Vyear)25. AdminmealJunctionFood(AdminMealID11d,FoodID16)26. AdminMIDjunctionMED(MedID14,ActID11)27. PrescrbedMedication(PSSN,AdminMID11d,MedID14 ,StartDate, EndDate) 28. EmployeeJunctionADL(ActID11,ESSN2)29. EmployeeJunctionCC(ESSN2,ActID12)30. LVNjunctionADMIN(ESSN2,ActID11,AdminMID11d,MedID14)32. PatientJunctionCarecenter ActID12,PSSN1)32. LVNjunctinNONIV(ESSN2,ProcedID10)33. RNAjunctionASSESS(ESSN2,ActID12c)34. RNAjunctinREHAB(rehabID11e,ESSN2)35. RNjunctionACTTYPE(ActID11,ESSN2)36. InsurancePlan(PlanID,InsurCompany)Screenshot

Normalization 1 AnalysisVisiting(VID, PSSN, Vmonth, Vday, Vyear, Vfname, Vlname)

Not in 2NF because partial dependencies existFunctional dependencies:{VID} {Vfname, Vlname} The relationship can be normalized to 2NF by removing the partial dependencies:

Visitor(VID, Vfname, Vlname)Visit(VID, PSSN, Vmonth, Vday, Vyear)

The relation is also in 3NF because no non-prime attributes determine another non-prime attribute.

Normalization 2 AnalysisInsurance(PSSN, InsurCompany, PlanID, MemberID)

The following functional dependencies hold:{PSSN, InsurCompany} {PlanID, MemberID}{MemberID, InsurCompany} {PSSN, PlanID}{PlanID} {InsurCompany}

Still in 3NF because the InsurCompany attribute is a prime attributeNot in BCNF because PlanID is not a primary key. Normalizing to BCNF:

PatientInsurance(PSSN, PlanID, MemberID)InsurancePlans(PlanID,InsurCompany)Objective:Tracks number of errors committed by Number of Employees per Shift, Employee, Shift, and Number beds full per shift, and calculates Chi Square correlation

Application:Allows the client to pinpoint the problem areas at the facility in order to minimize errors and improve the quality of life for patients.[Query name: Errors by Employee]SELECT ErrorJunctionEmp.ESSN, Count(*) AS Number_of_ErrorsFROM ErrorJunctionEmpGROUP BY ErrorJunctionEmp.ESSNUNIONSELECT Employee.ESSN, 0FROM EmployeeWHERE Employee.ESSN not IN (SELECT ErrorJunctionEmp.ESSNFROM ErrorJunctionEmp);[Query name: AvgErrEmp]SELECT Avg([Errors by Employee].Number_of_Errors) AS AvgErrFROM [Errors by Employee];[Query name: Error-Employee Correlation]SELECT Sum(([Errors by Employee].Number_of_Errors - AvgErrEmp.AvgErr)^2) / Sum(AvgErrEmp.AvgErr) AS ChiSquare, IIf(Sum(([Errors by Employee].Number_of_Errors - AvgErrEmp.AvgErr)^2) / Sum(AvgErrEmp.AvgErr) > Sum(MaxChiSquare.MaxChiSquare), "95% chance that a correlation exists: see 'Errors by Employee' for more details", "No correlation exists") AS CorrelationFROM [Errors by Employee], AvgErrEmp, MaxChiSquare;

Error Tracking Query

Errors by Number of Employees per ShiftErrors by Employee

Error Tracking Query, cont.Loneliness QueryObjective: To mitigate loneliness among patients by forecasting the number of expected visits in the next month using a weighted moving average. Application:Client can then schedule volunteers accordingly, focusing on those patients with the fewest expected visitors. SQL:SELECT DISTINCT pvj.PSSN, p.Fname, p.Lname, ((0.5*Count1.count1)+(0.3*Count2.count2)+(0.2*Count3.count3)) AS Next_Month_ForecastFROM patient AS p, Count1 INNER JOIN ((Count3 INNER JOIN PatVisJunction AS pvj ON Count3.PSSN=pvj.PSSN) INNER JOIN Count2 ON pvj.PSSN=Count2.PSSN) ON Count1.PSSN=pvj.PSSNWHERE (((pvj.PSSN)=Count1.PSSN And (pvj.PSSN)=Count2.PSSN And (pvj.PSSN)=Count3.PSSN) And ((p.PSSN)=pvj.PSSN));

Sample Report of Loneliness Query

Location Tracking QueryObjective:Query will output a floor plan of the facility, providing a mapping of: Patients with specified illness, and average distance between afflicted patients, OROccupied beds

Application:Allow the client to track and analyze various types of information in a visual manner.

SQL: Select b.xcoordinate, b.ycoordinateFrom bed b patient p pre-existingmedicalhistory pmhWhere bed.BedID=p.BedID and pmh.flu=yes;

Matlab:A=[x y];dist=[0];for i=1:length(x)-1 for j=1+i:length(x) dist(end+1)=((A(i,2)-A(j,2))^2+(A(i,1)-A(j, 1))^2)^.5; endend dist(dist==0)=[];z=factorial(length(x))/(factorial(2)*factorial(length(x)-2));average=sum(dist)/z

Average=292.1Returns Average distance between infected beds

Location Tracking QueryObjective:Query outputs Pearson Correlation Coefficient, which can be used in a linear program to determine the ideal number of employees to minimize the number of mistakes.

Application:Client can use this query to determine how many employees to place on each shift, to reduce the overall errors. SQL: Returns correlation coefficient (Errors vs. # Employees)SELECT SUM((Number_of_Employees - Avg.x_avg)*(Number_of_Errors- Avg.y_avg)) / SQR(SUM((Number_of_Employees - Avg.x_avg)^2) * SUM((Number_of_Errors - Avg.y_avg)^2)) AS pearson_rFROM ErrorsvsEmp, [Avg];

Correlation coefficient is inputted into AMPL

Schedule Optimization Query

EOQ QueryObjective:It calculates the quantity to order, the reorder point, and the remaining days of supply. It also calculates the average number of days in which the supplier has been delayedApplicationIndicates low levels of inventory, and whether the medicine should be ordered now or later, taking into account the average delay of the supplier.

tQReorder point if LD=0Reorder point if LD>0R

SELECT b.MedID AS MedID, b.Quantity_to_Order AS Quantity_to_Order, Round((m.LeadTime + b.AvgNoDaysDelayed) * m.Demand, 2) AS Reorder_Point, Round((g.CurrentInventory - (((m.LeadTime + b.AvgNoDaysDelayed) * m.Demand))) / m.Demand) AS Remaining_Days, IIf(g.CurrentInventory