Your SlideShare is downloading. ×

Workshop OH 2012-06-23

220
views

Published on


0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
220
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. D4D - Developers for Development OH Development Day
  • 2. D4D - Developers for Development OpenHospital Brainstorming e Social Partecipation Mattina Gruppi di lavoro Development... Pranzo Pizza! Pomeriggio Development... Fine Lavori Discussione dei lavori 17:30 OH Development Day
  • 3. • Repository: – http://sourceforge.net/projects/openhospital/• Mailing List SF: – openhospital-devel@lists.sourceforge.net• Persone di riferimento – Chiara De Felice – Fabrizio Lippolis – Alessandro Domanico – Paolo Schiavon
  • 4. •••••••••
  • 5. St.Luke Hospital of Angal (Uganda)Marie Mere Hospital of Mivo (Burundi)
  • 6. St.Luke Hospital of Wolisso (Etiopia)St.Orsola Hospital of Matiri (Kenya)
  • 7. St.Gemma Hospital of Miyuji (Tanzania)Orotta Hospital of Asmara (Eritrea)
  • 8. District Hospital of Malindi (Kenya) Orotta Hospital of Asmara (Eritrea) Public Health facilities District Hospital of Malindi (Kenya)
  • 9. Afghanistan – Kabul Kenya – Malindi – District HospitalBurundi – Mivo Kenya – SololoCongo – Guma Sud Sudan – WauEtiopia – Awassa – Blein Center Tanzania – GombaniEtiopia – Wolisso (CUAMM) Tanzania – MiyujiGrecia - Vatopedi Monastery Tanzania – MtwangoGuinea Bissau – Campus Madrugada Tanzania – PembaGuinea Bissau – Bissau – Bor Uganda – AngalKenya – Gede
  • 10. GUImanager modelservice DB
  • 11. POJO: Plain Old Java Object attributi privati default contructor getters and setters no annotations costruttori con campi overrinding di alcuni metodi
  • 12. import java.io.IOException; public class IoOperations {import java.sql.ResultSet; public ArrayList<Opd> getopd(boolean oneWeek){...}import java.sql.SQLException; public ArrayList<Opd> getopd(String diseaseTypeCode,Stringimport java.text.SimpleDateFormat; diseaseCode, GregorianCalendar dateFrom,GregorianCalendarimport java.util.ArrayList; dateTo,int ageFrom, int ageTo,char sex,Stringimport java.util.Date; newPatient){...}import java.util.GregorianCalendar; public boolean newOpd(Opd opd){...}import javax.swing.JOptionPane; public boolean updateOpd(Opd opd) {...}import org.isf.generaldata.MessageBundle; public boolean deleteOpd(Opd aopd) {...}import org.isf.opd.model.*; public int getProgYear(int year) {...}import org.isf.utils.db.DbQuery; public Opd getLastOpd(int patientcode) {...} public ArrayList<Opd> getopd(int patientcode) {...} private String convertToSQLDate(GregorianCalendar time) {...} private String convertToSQLDate(Date time) {...} private String convertToSQLDateLimited(GregorianCalendar time) {...} private String convertToSQLDateLimited(Date time) {...} }
  • 13. public class DbQuery { /* method that executes a query and returns a resultset */ public ResultSet getData(String aQuery,boolean autocommit) throws SQLException, IOException /* method that executes an insert-update-delete query and returns true or false depending on the success of the operation */ public boolean setData(String aQuery,boolean autocommit) throws SQLException , IOException /* method that executes an insert-update-delete query and returns A ResultSet containing the autogenerated key (integer counter) if no key has been generated the ResultSet will be empty */ public ResultSet setDataReturnGeneratedKey(String aQuery,boolean autocommit) throws SQLException , IOException /* method that executes a query and returns true or false depending on the existence of records or not in the Recordset */ public boolean isData(String aQuery) throws SQLException , IOException public Connection getConnection() throws SQLException, IOException public void closeConnection() throws SQLException, IOException public void releaseConnection() throws SQLException , IOException public void commit() throws SQLException , IOException public void rollback() throws SQLException , IOException}
  • 14. import javax.swing.Box;import javax.swing.BoxLayout;import javax.swing.ButtonGroup;import javax.swing.JButton;...import java.awt.AWTEvent;import java.awt.event.ActionListener;import java.awt.event.FocusListener;...import org.isf.opd.model.Opd;import org.isf.patient.model.Patient;import org.isf.disease.model.Disease;import org.isf.opd.manager.OpdBrowserManager;import org.isf.disease.manager.DiseaseBrowserManager;...import org.isf.generaldata.GeneralData;import org.isf.generaldata.MessageBundle;import org.isf.utils.jobjects.VoLimitedTextField;
  • 15. public void addOpdListener(OpdListener l) {}public interface opdListener extends EventListener { public void opdUpdated(AWTEvent e); public void opdInserted(AWTEvent e);}public class OpdBrowser extends JFrame implements OpdEdit.OpdListener {}
  • 16. private String getOpdNum() {}public int getProgYear(int year) {}OPD_ID OPD_DATE OPD_NEW_PAT OPD_DATE_VIS OPD_PROG_YEAR OPD_SEX OPD_AGE OPD_DIS_ID_A 29296 20/06/2012 13:51 N 20/06/2012 29296 M 30 39 29297 20/06/2012 14:52 N 20/06/2012 29297 F 50 38 29298 20/06/2012 15:53 N 20/06/2012 29298 F 20 200 29299 20/06/2012 21/06/2012 23:54 null N 21/06/2012 null 29299 null M null 28 null 21 29230 20/06/2012 23:54 21/06/2012 23:57 N 20/06/2012 21/06/2012 29299 29230 M 28 30 21 39 * * * * * * * *
  • 17. OPD_ID OPD_DATE OPD_NEW_PAT OPD_DATE_VIS OPD_PROG_YEAR OPD_SEX OPD_AGE OPD_DIS_ID_A 29296 20/06/2012 13:51 N 20/06/2012 29296 M 30 39 29297 20/06/2012 14:52 N 20/06/2012 29297 F 50 38 29298 20/06/2012 15:53 N 20/06/2012 29298 F 20 200 29299 20/06/2012 23:54 null null 29299 null null null 29230 20/06/2012 23:54 N 20/06/2012 29299 M 28 21 * * * * * * * *
  • 18. JUnit ORM MVC Swing JDBC AWT log4j slf4jLOGGING20/mar/2012 19:59:33 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT DISTINCT(BLP_USR_ID_A) FROM BILLPAYMENTS ORDER BY BLP_USR_ID_A ASC20/mar/2012 19:59:33 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT DISTINCT(BLP_USR_ID_A) FROM BILLPAYMENTS ORDER BY BLP_USR_ID_A ASC20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLPAYMENTS WHERE BLP_DATE >= ? AND BLP_DATE <= ? ORDER BY20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLPAYMENTS WHERE BLP_DATE >= ? AND BLP_DATE <= ? ORDER BY20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLPAYMENTS WHERE BLP_DATE >= ? AND BLP_DATE <= ? ORDER BY20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLPAYMENTS WHERE BLP_DATE >= ? AND BLP_DATE <= ? ORDER BY20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_STATUS = O ORDER BY BLL_DATE DESC (org.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_STATUS = O ORDER BY BLL_DATE DESC (org.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils.20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLPAYMENTS WHERE BLP_DATE >= ? AND BLP_DATE <= ? ORDER BY20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLPAYMENTS WHERE BLP_DATE >= ? AND BLP_DATE <= ? ORDER BY20/mar/2012 19:59:34 DEBUG org.isf.utils.db.DBQueryExtended [AWT-EventQueue-0] - Executing SELECT * FROM BILLS WHERE BLL_DATE >= ? AND BLL_DATE <= ? (org.isf.utils....
  • 19.  1 server Linux o Windows con MySQL Server 5 or greater N clients Linux o Windows con OH Portable opportunamente configurate infrastruttura di rete LAN wired o wireless Doctors Nurses Receptionists Admin
  • 20. Installazione: sul server vengono creati il DB e le utenze • Se c’è Internet vengono impostati servizi per l’accesso remoto (SSH, VNC, TeamViewer, ecc...) • Vengono schedulati backup periodici del DB le P-OH vengono installate sui client e vengono configurate con: • indirizzo IP del server • utenza mysql (sempre la stessa o diversa a seconda delle necessità) • attivazione/disattivazione di funzionalità InstallerAggiornamento: Se l’aggiornamento non modifica il DB vengono sostituite soltanto le P-OH suiclient Se l’aggiornamento modifica il DB vengono applicati anche gli script diaggiornamento sul server Updater
  • 21. ORMIntrodurre uno o più ORM modificando un paio di service; questo implicherà lamodifica del model e, per i motivi già discussi, avrà sicuramente ripercussionisul manager e sulla gui.l’ORM dev’essere ampiamente conosciuto o documentato e il peso delle libreriesarà valutato tra i costi/benefici.MVCModificare una o più coppie GUI/Manager per disaccoppiarli il più possibile(MVC) e provare a riutilizzare i metodi con altri linguaggi (ad es. Python) LOGGING Updater Installer
  • 22. Gestire linventario relativo alla banca del sangue EritreaSicurezza dei dati sensibili EritreaStorico delle medicine somministrate ad un paziente KenyaNumerazione OPD ISFHL7, DICOM, ecc ISFConfiguratore dei report ISFBill automatico Kenya CUAMMGestione dati HIV Maurizio BertoldiPassword utenti crittografate ISFAnamnesi del paziente (storico statico) CESAIM Guinea BissauModulo Fornitori per la Farmacia CUAMM Etiopia

×