Java 类ims.core.vo.domain.HcpLiteVoAssembler 实例源码

项目:AvoinApotti    文件:StoolScaleImpl.java   
public HcpLiteVoCollection listHCP(String name)
{
    // Check parameter
    if (name == null)
        return null;

    String hqlQuery = "from Hcp hcp where hcp.mos.name.upperSurname like :NAME or hcp.mos.name.upperForename like :NAME order by hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");

    ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(hqlQuery, paramNames, paramValues));
}
项目:AvoinApotti    文件:MOSQueryImpl.java   
private IMos[] listHCP(String name, String subClass, HcpDisType mosDiscipline, Integer mosLocation, Boolean canReferPatient,Boolean isALocalConsultant,Boolean isResponsibleHcp) 
{
    List hcps = listHCPList(name, subClass, mosDiscipline, mosLocation, canReferPatient,isALocalConsultant,isResponsibleHcp);//WDEV-15544   //WDEV-15194

    if(mosDiscipline != null || subClass != null)
    {
        return listByDiscipline(hcps, name, mosDiscipline);
    }

    /*if(mosLocation!=null){
        HcpCollection collHcps = listMOSByPrimaryLocation(HcpAssembler.createHcpCollectionFromHcp(hcps), mosLocation);
        DomainFactory factory = getDomainFactory();
        hcps = HcpAssembler.extractHcpList(factory, collHcps);
    }
    */

    return (HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcps)).sort().toIMosArray();
}
项目:AvoinApotti    文件:ProceduresPerformedByHCPImpl.java   
public HcpLiteVoCollection getAvailableHCPs(String filter) 
{
    DomainFactory factory=getDomainFactory();
    IMSCriteria imsc=new IMSCriteria(Hcp.class,factory);
    if (filter!=null)
    {
        imsc.join("this.mos", "mos");
        imsc.like("mos.name.surname", filter + "%");
    }
    List hcpColl=imsc.find();

    HcpLiteVoCollection hcps=HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcpColl);
    HcpLiteVoCollection availableHcps=new HcpLiteVoCollection();

    removeAlreadyUsedHcps(hcps);

    for (int i=0;i<hcps.size();i++)
    {
        if (this.getAvailableServices(hcps.get(i).toHcpRefVo())!=null)
            availableHcps.add(hcps.get(i));
    }
    if (availableHcps.size()>0)
        return availableHcps;

    return null;
}
项目:AvoinApotti    文件:DynamicAssessmentsImpl.java   
private Patient_AssessmentVo assemblePatientAssessment(PatientAssessment doPatientAssessment) 
{
    if(doPatientAssessment == null)
        return null;

    Patient_AssessmentVo patientAssessment = new Patient_AssessmentVo(doPatientAssessment.getId(), doPatientAssessment.getVersion());
    patientAssessment.setIsRIE(doPatientAssessment.getIsRIE());
    patientAssessment.setStatus(doPatientAssessment.getStatus() != null ? LookupHelper.getPatientAssessmentStatusReasonInstance(getLookupService(), doPatientAssessment.getStatus().getId()) : null);
    patientAssessment.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientAssessment.getAuthoringInformation()));
    patientAssessment.setCompletedHCP(HcpLiteVoAssembler.create(doPatientAssessment.getCompletedHCP()));
    patientAssessment.setCompletedDateTime(doPatientAssessment.getCompletedDateTime() != null ? new DateTime(doPatientAssessment.getCompletedDateTime()) : null);
    patientAssessment.setPatient(doPatientAssessment.getPatient() != null ? new PatientRefVo(doPatientAssessment.getPatient().getId(), doPatientAssessment.getPatient().getVersion()) : null);
    patientAssessment.setEpisodeOfCare(doPatientAssessment.getEpisodeOfCare() != null ? new EpisodeOfCareRefVo(doPatientAssessment.getEpisodeOfCare().getId(), doPatientAssessment.getEpisodeOfCare().getVersion()) : null);
    patientAssessment.setCareContext(doPatientAssessment.getCareContext() != null ? new CareContextRefVo(doPatientAssessment.getCareContext().getId(), doPatientAssessment.getCareContext().getVersion()) : null);
    patientAssessment.setClinicalContact(doPatientAssessment.getClinicalContact() != null ? new ClinicalContactRefVo(doPatientAssessment.getClinicalContact().getId(), doPatientAssessment.getClinicalContact().getVersion()) : null);
    patientAssessment.setScore(doPatientAssessment.getScore());
    patientAssessment.setIsAssessmentDocumentSaved(doPatientAssessment.isIsAssessmentDocumentSaved());
    patientAssessment.setAssessmentData(assemblePatientAssessmentData(doPatientAssessment.getAssessmentData()));
    //wdev-15972
    patientAssessment.setAssociatedDocument(doPatientAssessment.getAssociatedDocument() != null ? new PatientDocumentRefVo(doPatientAssessment.getAssociatedDocument().getId(),doPatientAssessment.getAssociatedDocument().getVersion()):null);
    //----------

    return patientAssessment;
}
项目:AvoinApotti    文件:WaitingListConfigurationImpl.java   
public HcpLiteVoCollection listConsultants(String name)
{
    if(name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Can not search on null name.");

    StringBuffer hqlConditions = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hql = "select hcp from Hcp as hcp where hcp.isActive = 1 and (hcp.mos.name.upperSurname like :hcpSname or hcp.mos.name.upperForename like :hcpFname) ";
    markers.add("hcpSname");
    values.add(name.toUpperCase() + "%");

    markers.add("hcpFname");
    values.add(name.toUpperCase() + "%");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find((hql + hqlConditions.toString() + " order by hcp.mos.name.upperSurname , hcp.mos.name.upperForename asc").toString(), markers, values);

    if (list != null && list.size() > 0)
        return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(list);

    return null;
}
项目:AvoinApotti    文件:MyOrderImpl.java   
public HcpLiteVo getInitiallySeenByHcpFromConsultationClinicalNotesByReferral(CatsReferralRefVo referral)
{
    if (referral == null || referral.getID_CatsReferral() == null)
        throw new CodingRuntimeException("referral is null or id not provided in method getInitiallySeenByHcpFromConsultationClinicalNotesByReferral");

    String hql = "select cons.initiallySeenBy.authoringHcp from ConsultationClinicalNotes as cons left join cons.catsReferral as referral where referral.id = " + referral.getID_CatsReferral() + " order by cons.systemInformation.creationDateTime desc ";
    List hcpList =  getDomainFactory().find(hql);
    if(hcpList != null && hcpList.size() >= 1)
    {
        Hcp doHcp = (Hcp)hcpList.get(0);
        if(doHcp != null)
            return HcpLiteVoAssembler.create(doHcp);
    }

    return null;
}
项目:AvoinApotti    文件:LeadConsultantForSpecialtyConfigDialogImpl.java   
public ims.core.vo.HcpLiteVoCollection listHcpMedic(String hcpName)
{
    DomainFactory factory = getDomainFactory();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hcpNameLite = hcpName != null ? hcpName.toUpperCase() + "%" : "%%";

    if (hcpName == null || hcpName.trim().length() == 0)
        throw new DomainRuntimeException("String for search is null.");

    StringBuffer hql = new StringBuffer();

    hql.append(" select hcp from Hcp as hcp left join hcp.mos as mos, Medic as medic");
    hql.append(" where mos.name.upperSurname like :HcpName and hcp.isActive = 1 and medic.isHCPaResponsibleHCP = 1 and medic.id = hcp.id ");
    hql.append(" order by UPPER(mos.name.upperSurname) asc");

    markers.add("HcpName");
    values.add(hcpNameLite);

    List<?> fact=factory.find(hql.toString(), markers, values);
    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(fact);
}
项目:AvoinApotti    文件:NewResultsImpl.java   
/**
 * WDEV-13876
 * List reviewing HCP (only active HCP marked as responsible HCP)
 */
public HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE mos.name.upperSurname LIKE :HCP_NAME AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:NewResultsAllTabComponentImpl.java   
public ims.core.vo.HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE (mos.name.upperSurname LIKE :HCP_NAME OR mos.name.upperForename LIKE :HCP_NAME) AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:ReferralAppointmentDetailsComponentImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:AvoinApotti    文件:ElectiveListManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
    if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:AvoinApotti    文件:TheatreListImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt);
    if (doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:AvoinApotti    文件:FunctionalTransfersImpl.java   
public HcpLiteVoCollection listHcps(String value)
{
    // Check parameter
    if (value == null || value.length() <= 0)
        throw new DomainRuntimeException("Provide at least 3 character for HCP search");

    String query = "from Hcp as hcp where hcp.mos.name.upperSurname like :SURNAME or hcp.mos.name.upperForename like :FORENAME";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("SURNAME");
    paramValues.add(value.toUpperCase());
    paramNames.add("FORENAME");
    paramValues.add(value.toUpperCase());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:PlannedPerformedProcedureDialogImpl.java   
public HcpLiteVo getHcpLiteVo(MemberOfStaffRefVo mosRef)
{
    if( mosRef == null || mosRef.getID_MemberOfStaff()==null )
        return null;

    DomainFactory factory = getDomainFactory();

    List <?>hcp = factory.find("select mos.hcp from MemberOfStaff as mos where (mos.id = :mosId)", new String[] {"mosId"}, new Object[] {mosRef.getID_MemberOfStaff()});


    if( hcp != null && hcp.size() > 0)
    {
        return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcp).get(0);
    }

    return null;
}
项目:AvoinApotti    文件:EDischargeFuturePlanSthkComponentImpl.java   
public HcpLiteVoCollection listHCP(String hcpName) throws DomainInterfaceException
{
    if (hcpName == null || hcpName.length() < 3)
        throw new DomainInterfaceException("Please enter at least 3 characters to search upon.");

    String query = " from Hcp as hcp where hcp.mos.name.upperSurname like :SNAME or hcp.mos.name.upperForename like :FNAME ORDER BY hcp.mos.name.upperSurname asc, hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("SNAME");
    paramNames.add("FNAME");

    String name = "%"+hcpName.toUpperCase()+"%";//WDEV-12041

    paramValues.add(name);
    paramValues.add(name);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:ExtendedClinicalNotesImpl.java   
public HcpLiteVo getHcpLiteVoFOrMosID(Integer mosId) 
{
    if (mosId == null) 
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from Hcp h " +
    " where h.mos.id = :mosId";

    String[] names = new String[]{"mosId"};
    Object[] vals = new Object[]{mosId};
    List hcpList = factory.find(hql,names, vals);

    if (hcpList != null && hcpList.size() > 0)
        return HcpLiteVoAssembler.create((Hcp)hcpList.get(0));

    return null;

}
项目:AvoinApotti    文件:PharmacyApprovalWorklistImpl.java   
/**
 * Domain function to search for HCPs matching name
 */
public ims.core.vo.HcpLiteVoCollection listHcp(String name)
{
    if (name == null)
        throw new DomainRuntimeException("Can not search after null name.");

    String query = " FROM Hcp AS hcp WHERE (hcp.mos.name.upperSurname LIKE :SNAME OR hcp.mos.name.upperForename LIKE :FNAME) AND hcp.isActive = 1 order by hcp.mos.name.upperSurname asc, hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("SNAME");
    paramNames.add("FNAME");

    paramValues.add("%" + name.toUpperCase() + "%");
    paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:StoolScaleImpl.java   
public HcpLiteVoCollection listHCP(String name)
{
    // Check parameter
    if (name == null)
        return null;

    String hqlQuery = "from Hcp hcp where hcp.mos.name.upperSurname like :NAME or hcp.mos.name.upperForename like :NAME order by hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");

    ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(hqlQuery, paramNames, paramValues));
}
项目:openMAXIMS    文件:MOSQueryImpl.java   
private IMos[] listHCP(String name, String subClass, HcpDisType mosDiscipline, Integer mosLocation, Boolean canReferPatient,Boolean isALocalConsultant,Boolean isResponsibleHcp, ServiceRefVo service, ServiceFunction function) 
{
    List hcps = listHCPList(name, subClass, mosDiscipline, mosLocation, canReferPatient,isALocalConsultant,isResponsibleHcp, service, function);//WDEV-15544    //WDEV-15194

    if(mosDiscipline != null || subClass != null)
    {
        return listByDiscipline(hcps, name, mosDiscipline);
    }

    /*if(mosLocation!=null){
        HcpCollection collHcps = listMOSByPrimaryLocation(HcpAssembler.createHcpCollectionFromHcp(hcps), mosLocation);
        DomainFactory factory = getDomainFactory();
        hcps = HcpAssembler.extractHcpList(factory, collHcps);
    }
    */

    return (HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcps)).sort().toIMosArray();
}
项目:openMAXIMS    文件:ProceduresPerformedByHCPImpl.java   
public HcpLiteVoCollection getAvailableHCPs(String filter) 
{
    DomainFactory factory=getDomainFactory();
    IMSCriteria imsc=new IMSCriteria(Hcp.class,factory);
    if (filter!=null)
    {
        imsc.join("this.mos", "mos");
        imsc.like("mos.name.surname", filter + "%");
    }
    List hcpColl=imsc.find();

    HcpLiteVoCollection hcps=HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcpColl);
    HcpLiteVoCollection availableHcps=new HcpLiteVoCollection();

    removeAlreadyUsedHcps(hcps);

    for (int i=0;i<hcps.size();i++)
    {
        if (this.getAvailableServices(hcps.get(i).toHcpRefVo())!=null)
            availableHcps.add(hcps.get(i));
    }
    if (availableHcps.size()>0)
        return availableHcps;

    return null;
}
项目:openMAXIMS    文件:StoolScaleImpl.java   
public HcpLiteVoCollection listHCP(String name)
{
    // Check parameter
    if (name == null)
        return null;

    String hqlQuery = "from Hcp hcp where hcp.mos.name.upperSurname like :NAME or hcp.mos.name.upperForename like :NAME order by hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");

    ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(hqlQuery, paramNames, paramValues));
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
private Patient_AssessmentVo assemblePatientAssessment(PatientAssessment doPatientAssessment) 
{
    if(doPatientAssessment == null)
        return null;

    Patient_AssessmentVo patientAssessment = new Patient_AssessmentVo(doPatientAssessment.getId(), doPatientAssessment.getVersion());
    patientAssessment.setIsRIE(doPatientAssessment.getIsRIE());
    patientAssessment.setStatus(doPatientAssessment.getStatus() != null ? LookupHelper.getPatientAssessmentStatusReasonInstance(getLookupService(), doPatientAssessment.getStatus().getId()) : null);
    patientAssessment.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientAssessment.getAuthoringInformation()));
    patientAssessment.setCompletedHCP(HcpLiteVoAssembler.create(doPatientAssessment.getCompletedHCP()));
    patientAssessment.setCompletedDateTime(doPatientAssessment.getCompletedDateTime() != null ? new DateTime(doPatientAssessment.getCompletedDateTime()) : null);
    patientAssessment.setPatient(doPatientAssessment.getPatient() != null ? new PatientRefVo(doPatientAssessment.getPatient().getId(), doPatientAssessment.getPatient().getVersion()) : null);
    patientAssessment.setEpisodeOfCare(doPatientAssessment.getEpisodeOfCare() != null ? new EpisodeOfCareRefVo(doPatientAssessment.getEpisodeOfCare().getId(), doPatientAssessment.getEpisodeOfCare().getVersion()) : null);
    patientAssessment.setCareContext(doPatientAssessment.getCareContext() != null ? new CareContextRefVo(doPatientAssessment.getCareContext().getId(), doPatientAssessment.getCareContext().getVersion()) : null);
    patientAssessment.setClinicalContact(doPatientAssessment.getClinicalContact() != null ? new ClinicalContactRefVo(doPatientAssessment.getClinicalContact().getId(), doPatientAssessment.getClinicalContact().getVersion()) : null);
    patientAssessment.setScore(doPatientAssessment.getScore());
    patientAssessment.setIsAssessmentDocumentSaved(doPatientAssessment.isIsAssessmentDocumentSaved());
    patientAssessment.setAssessmentData(assemblePatientAssessmentData(doPatientAssessment.getAssessmentData()));
    //wdev-15972
    patientAssessment.setAssociatedDocument(doPatientAssessment.getAssociatedDocument() != null ? new PatientDocumentRefVo(doPatientAssessment.getAssociatedDocument().getId(),doPatientAssessment.getAssociatedDocument().getVersion()):null);
    //----------

    return patientAssessment;
}
项目:openMAXIMS    文件:InterProviderTransferOutDialogImpl.java   
public HcpLiteVoCollection getListOwnersForSession(ims.scheduling.vo.Sch_SessionRefVo session)
{
    if (session == null || session.getID_Sch_Session() == null)
        return null;

    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    String hql = "select hcp from Sch_Session as session left join session.listOwners as owners left join owners.hcp as hcp where session.id = :sessionID and hcp.isActive = :isActive ";

    markers.add("sessionID");
    values.add(session.getID_Sch_Session());

    markers.add("isActive");
    values.add(Boolean.TRUE);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:PlannedPerformedProcedureDialogImpl.java   
public HcpLiteVo getHcpLiteVo(MemberOfStaffRefVo mosRef)
{
    if( mosRef == null || mosRef.getID_MemberOfStaff()==null )
        return null;

    DomainFactory factory = getDomainFactory();

    List <?>hcp = factory.find("select mos.hcp from MemberOfStaff as mos where (mos.id = :mosId)", new String[] {"mosId"}, new Object[] {mosRef.getID_MemberOfStaff()});


    if( hcp != null && hcp.size() > 0)
    {
        return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcp).get(0);
    }

    return null;
}
项目:openMAXIMS    文件:MOSQueryImpl.java   
private IMos[] listHCP(String name, String subClass, HcpDisType mosDiscipline, Integer mosLocation, Boolean canReferPatient,Boolean isALocalConsultant,Boolean isResponsibleHcp) 
{
    List hcps = listHCPList(name, subClass, mosDiscipline, mosLocation, canReferPatient,isALocalConsultant,isResponsibleHcp);//WDEV-15544   //WDEV-15194

    if(mosDiscipline != null || subClass != null)
    {
        return listByDiscipline(hcps, name, mosDiscipline);
    }

    /*if(mosLocation!=null){
        HcpCollection collHcps = listMOSByPrimaryLocation(HcpAssembler.createHcpCollectionFromHcp(hcps), mosLocation);
        DomainFactory factory = getDomainFactory();
        hcps = HcpAssembler.extractHcpList(factory, collHcps);
    }
    */

    return (HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcps)).sort().toIMosArray();
}
项目:openmaxims-linux    文件:NewResultsAllTabComponentImpl.java   
public ims.core.vo.HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE (mos.name.upperSurname LIKE :HCP_NAME OR mos.name.upperForename LIKE :HCP_NAME) AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:NewResultsAllTabComponentImpl.java   
public ims.core.vo.HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE (mos.name.upperSurname LIKE :HCP_NAME OR mos.name.upperForename LIKE :HCP_NAME) AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openmaxims-linux    文件:PharmacyApprovalWorklistImpl.java   
/**
 * Domain function to search for HCPs matching name
 */
public ims.core.vo.HcpLiteVoCollection listHcp(String name)
{
    if (name == null)
        throw new DomainRuntimeException("Can not search after null name.");

    String query = " FROM Hcp AS hcp WHERE (hcp.mos.name.upperSurname LIKE :SNAME OR hcp.mos.name.upperForename LIKE :FNAME) AND hcp.isActive = 1 order by hcp.mos.name.upperSurname asc, hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("SNAME");
    paramNames.add("FNAME");

    paramValues.add("%" + name.toUpperCase() + "%");
    paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:LeadConsultantForSpecialtyConfigDialogImpl.java   
public ims.core.vo.HcpLiteVoCollection listHcpMedic(String hcpName)
{
    DomainFactory factory = getDomainFactory();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hcpNameLite = hcpName != null ? hcpName.toUpperCase() + "%" : "%%";

    if (hcpName == null || hcpName.trim().length() == 0)
        throw new DomainRuntimeException("String for search is null.");

    StringBuffer hql = new StringBuffer();

    hql.append(" select hcp from Hcp as hcp left join hcp.mos as mos, Medic as medic");
    hql.append(" where mos.name.upperSurname like :HcpName and hcp.isActive = 1 and medic.isHCPaResponsibleHCP = 1 and medic.id = hcp.id ");
    hql.append(" order by mos.name.upperSurname asc"); //WDEV-20219

    markers.add("HcpName");
    values.add(hcpNameLite);

    List<?> fact=factory.find(hql.toString(), markers, values);
    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(fact);
}
项目:openMAXIMS    文件:NewResultsAllTabComponentImpl.java   
public ims.core.vo.HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE (mos.name.upperSurname LIKE :HCP_NAME OR mos.name.upperForename LIKE :HCP_NAME) AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openmaxims-linux    文件:StoolScaleImpl.java   
public HcpLiteVoCollection listHCP(String name)
{
    // Check parameter
    if (name == null)
        return null;

    String hqlQuery = "from Hcp hcp where hcp.mos.name.upperSurname like :NAME or hcp.mos.name.upperForename like :NAME order by hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
        paramNames.add("NAME");

    ArrayList<Object> paramValues = new ArrayList<Object>();
        paramValues.add("%" + name.toUpperCase() + "%");

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(hqlQuery, paramNames, paramValues));
}
项目:openMAXIMS    文件:ReferralAppointmentDetailsComponentImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:ElectiveListManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
    if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:TheatreListImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt);
    if (doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:NewResultsImpl.java   
/**
 * WDEV-13876
 * List reviewing HCP (only active HCP marked as responsible HCP)
 */
public HcpLiteVoCollection listReviewingHCP(String name)
{
    if (name == null || name.length() == 0)
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT hcp FROM Hcp AS hcp LEFT JOIN hcp.mos AS mos WHERE mos.name.upperSurname LIKE :HCP_NAME AND hcp.isActive = 1 AND hcp.hcpType.id = :MEDIC_TYPE ORDER BY mos.name.upperSurname";

    paramNames.add("HCP_NAME");
    paramValues.add(name.toUpperCase() + "%");

    paramNames.add("MEDIC_TYPE");
    paramValues.add(HcpDisType.MEDICAL.getID());

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public HcpLiteVo getInitiallySeenByHcpFromConsultationClinicalNotesByReferral(CatsReferralRefVo referral)
{
    if (referral == null || referral.getID_CatsReferral() == null)
        throw new CodingRuntimeException("referral is null or id not provided in method getInitiallySeenByHcpFromConsultationClinicalNotesByReferral");

    String hql = "select cons.initiallySeenBy.authoringHcp from ConsultationClinicalNotes as cons left join cons.catsReferral as referral where referral.id = " + referral.getID_CatsReferral() + " order by cons.systemInformation.creationDateTime desc ";
    List hcpList =  getDomainFactory().find(hql);
    if(hcpList != null && hcpList.size() >= 1)
    {
        Hcp doHcp = (Hcp)hcpList.get(0);
        if(doHcp != null)
            return HcpLiteVoAssembler.create(doHcp);
    }

    return null;
}
项目:openMAXIMS    文件:ElectiveListManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
    if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:PlannedPerformedProcedureDialogImpl.java   
public HcpLiteVo getHcpLiteVo(MemberOfStaffRefVo mosRef)
{
    if( mosRef == null || mosRef.getID_MemberOfStaff()==null )
        return null;

    DomainFactory factory = getDomainFactory();

    List <?>hcp = factory.find("select mos.hcp from MemberOfStaff as mos where (mos.id = :mosId)", new String[] {"mosId"}, new Object[] {mosRef.getID_MemberOfStaff()});


    if( hcp != null && hcp.size() > 0)
    {
        return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(hcp).get(0);
    }

    return null;
}
项目:openMAXIMS    文件:InternalReferralsIncomingListComponentImpl.java   
public HcpLiteVoCollection listHCPs(String name) 
{
    if (name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Cannot search on null name.");

    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hql = "select h from Hcp h where h.isActive = :isActive and (h.mos.name.upperSurname like :hcpSname or h.mos.name.upperForename like :hcpFname)";

    markers.add("isActive");
    values.add(Boolean.TRUE);
    markers.add("hcpSname");
    values.add(name.toUpperCase() + "%");
    markers.add("hcpFname");
    values.add(name.toUpperCase() + "%");

    hql += " order by h.mos.name.upperSurname,h.mos.name.upperForename";

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:EDischargeFuturePlanSthkComponentImpl.java   
public HcpLiteVoCollection listHCP(String hcpName) throws DomainInterfaceException
{
    if (hcpName == null || hcpName.length() < 3)
        throw new DomainInterfaceException("Please enter at least 3 characters to search upon.");

    String query = " from Hcp as hcp where hcp.mos.name.upperSurname like :SNAME or hcp.mos.name.upperForename like :FNAME ORDER BY hcp.mos.name.upperSurname asc, hcp.mos.name.upperForename asc";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("SNAME");
    paramNames.add("FNAME");

    String name = "%"+hcpName.toUpperCase()+"%";//WDEV-12041

    paramValues.add(name);
    paramValues.add(name);

    return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(getDomainFactory().find(query, paramNames, paramValues));
}