SlideShare a Scribd company logo
1 of 31
D4D - Developers for Development
OH Development Day
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
• 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
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
• Multiutenza
• OPD (ambulatori)
• IPD (ricoveri)
• Pharmacy
• Laboratory
• Pregnancy
• Malnutrition
• Statistics
• Reports
Tecnologie scelte:
Obiettivi:
Alcuni progetti
St.Luke Hospital of Angal (Uganda)
Marie Mere Hospital of Mivo (Burundi)
Alcuni rogetti
St.Luke Hospital of Wolisso (Etiopia)
St.Orsola Hospital of Matiri (Kenya)
Alcuni progetti
St.Gemma Hospital of Miyuji (Tanzania)
Orotta Hospital of Asmara (Eritrea)
Alcuni progetti
District Hospital of Malindi (Kenya)
Orotta Hospital of Asmara (Eritrea)
District Hospital of Malindi (Kenya)
Public Health facilities
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
Installazioni oggi
Live!
GUI
DB
manager
model
service
POJO: Plain Old Java Object
 attributi privati
 default contructor
 getters and setters
 no annotations
 costruttori con campi
 overrinding di alcuni metodi
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) {...}
}
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
}
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;
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);
}
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
* * * * * * * *
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
* * * * * * * *
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
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
Gestione delle utenze
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
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
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

More Related Content

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Workshop OH 2012-06-23

  • 1. D4D - Developers for Development OH Development Day
  • 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
  • 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. 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
  • 6. • Multiutenza • OPD (ambulatori) • IPD (ricoveri) • Pharmacy • Laboratory • Pregnancy • Malnutrition • Statistics • Reports Tecnologie scelte: Obiettivi:
  • 7. Alcuni progetti St.Luke Hospital of Angal (Uganda) Marie Mere Hospital of Mivo (Burundi)
  • 8. Alcuni rogetti St.Luke Hospital of Wolisso (Etiopia) St.Orsola Hospital of Matiri (Kenya)
  • 9. Alcuni progetti St.Gemma Hospital of Miyuji (Tanzania) Orotta Hospital of Asmara (Eritrea)
  • 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
  • 13. Live!
  • 14.
  • 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 }
  • 20.
  • 21. 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;
  • 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