Hello,
I am new to Dcm4chee-arc-light. I would like to get a list of patients in java, so i looked into dcm4chee's code and found the class PatientServiceEJB.java (in dcm4chee-arc-patient/impl). This java class have a method (findPatient) that allows to search the database for a particular patient using it's ID and Issuer.
I wanted to use this and did in my code :
PatientServiceEJB ps = new PatientServiceEJB();
IDWithIssuer pid = new IDWithIssuer("2000031031","DPI");
ps.findPatient(pid);
But it returns an error :
Time elapsed: 0.024 sec <<< ERROR!
java.lang.NullPointerException
at org.dcm4chee.arc.patient.impl.PatientServiceEJB.findPatients(PatientServiceEJB.java:75)
So I added a System.out.print(em) in the findPatient method and it turns out the em (EntityManager) is null.
Did I miss something ? Or is there any other way to get the patient list in code ?
ps : I don't have any dependencies problems with javax.persistance
Thanks in advance :)