2. D4D - Developers for Development
OH Development Day
Mattina
OpenHospital
Brainstorming e Social Partecipation
Gruppi di lavoro
Development...
Pranzo Pizza!
Pomeriggio Development...
Fine Lavori
17:30
Discussione dei lavori
5. Nato nel 2006 per il
St. Luke Hospital of Angal (Uganda)
Scopo del progetto fu quello di fornire un software
semplice e affidabile per la registrazione delle
principali attività della struttura ospedaliera (ca. 200
posti letto)
OpenHospital
10. Alcuni progetti
District Hospital of Malindi (Kenya)
Orotta Hospital of Asmara (Eritrea)
District Hospital of Malindi (Kenya)
Public Health facilities
11. Afghanistan – Kabul
Burundi – Mivo
Congo – Guma
Etiopia – Awassa – Blein Center
Etiopia – Wolisso (CUAMM)
Grecia - Vatopedi Monastery
Guinea Bissau – Campus Madrugada
Guinea Bissau – Bissau – Bor
Kenya – Gede
Kenya – Malindi – District Hospital
Kenya – Sololo
Sud Sudan – Wau
Tanzania – Gombani
Tanzania – Miyuji
Tanzania – Mtwango
Tanzania – Pemba
Uganda – Angal
Installazioni oggi
16. POJO: Plain Old Java Object
attributi privati
default contructor
getters and setters
no annotations
costruttori con campi
overrinding di alcuni metodi
17.
18. import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.swing.JOptionPane;
import org.isf.generaldata.MessageBundle;
import org.isf.opd.model.*;
import org.isf.utils.db.DbQuery;
public class IoOperations {
public ArrayList<Opd> getopd(boolean oneWeek){...}
public ArrayList<Opd> getopd(String diseaseTypeCode,String
diseaseCode, GregorianCalendar dateFrom,GregorianCalendar
dateTo,int ageFrom, int ageTo,char sex,String
newPatient){...}
public boolean newOpd(Opd opd){...}
public boolean updateOpd(Opd opd) {...}
public boolean deleteOpd(Opd aopd) {...}
public int getProgYear(int year) {...}
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) {...}
}
19. 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
}
22. public class OpdBrowser extends JFrame implements OpdEdit.OpdListener {}
public void addOpdListener(OpdListener l) {}
public interface opdListener extends EventListener {
public void opdUpdated(AWTEvent e);
public void opdInserted(AWTEvent e);
}
23. 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 21/06/2012 23:54 N 21/06/2012 29299 M 28 21
29230 21/06/2012 23:57 N 21/06/2012 29230 M 30 39
* * * * * * * *
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 23:54 null null 29299 null null null
29230 20/06/2012 23:54 N 20/06/2012 29299 M 28 21
* * * * * * * *
24. 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
* * * * * * * *
25.
26. JDBC
Swing
AWT
ORM MVC
20/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 ASC
20/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 ASC
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 BY
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 BY
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 BY
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 BY
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_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 BY
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 BY
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.
...
log4j slf4j
JUnit
LOGGING
27. Caso standard
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
Admin
Receptionists
29. Installazione e Aggiornamento
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à
Aggiornamento:
Se l’aggiornamento non modifica il DB vengono sostituite soltanto le P-OH sui
client
Se l’aggiornamento modifica il DB vengono applicati anche gli script di
aggiornamento sul server
Installer
Updater
30. Introdurre uno o più ORM modificando un paio di service; questo implicherà la
modifica del model e, per i motivi già discussi, avrà sicuramente ripercussioni
sul manager e sulla gui.
l’ORM dev’essere ampiamente conosciuto o documentato e il peso delle librerie
sarà valutato tra i costi/benefici.
Modificare una o più coppie GUI/Manager per disaccoppiarli il più possibile
(MVC) e provare a riutilizzare i metodi con altri linguaggi (ad es. Python)
ORM
MVC
Installer
Updater
LOGGING
31. Gestire l'inventario relativo alla banca del sangue Eritrea
Sicurezza dei dati sensibili Eritrea
Storico delle medicine somministrate ad un paziente Kenya
Numerazione OPD ISF
HL7, DICOM, ecc ISF
Configuratore dei report ISF
Bill automatico Kenya CUAMM
Gestione dati HIV Maurizio Bertoldi
Password utenti crittografate ISF
Anamnesi del paziente (storico statico) CESAIM Guinea Bissau
Modulo Fornitori per la Farmacia CUAMM Etiopia