Java 类ims.core.vo.PatientCollection 实例源码

项目:AvoinApotti    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private Patient getPatientForCareContext(CareContextRefVo careContext) 
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
    throw new CodingRuntimeException("CareContext is null or id not provided for getPatientForCareContext");    

    DomainFactory factory = getDomainFactory();
    List pat = factory.find("select careSpell.patient rom CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    PatientCollection patVo = PatientAssembler.createPatientCollectionFromPatient(pat);     

    return patVo != null && patVo.size() > 0 ? patVo.get(0) : null;
}
项目:openMAXIMS    文件:FirstAppointmentSearchImpl.java   
private ims.core.vo.Patient getLocalPatient(PatientShort patVo) 
{
    DomainFactory factory = getDomainFactory();

    if (patVo.getIdentifiers() == null || patVo.getIdentifiers().size() == 0 || (patVo.getIdentifiers().get(0)) == null)
    {
        throw new DomainRuntimeException("Patient Get call must contain valid identifier");
    }   

    PatientIdCollection identifiers = patVo.getIdentifiers();
    for (int i = 0; i < identifiers.size(); i++)
    {
        if (identifiers.get(i).getType().equals(PatIdType.PKEY))
        {
            String idVal = identifiers.get(i).getIdValue().trim();
            String hql = " from Patient p join p.identifiers as ids where ids.type = :idType and ids.value = :idValue ";

            java.util.List<?> patientList = factory.find(hql, new String[]{"idValue", "idType"}, new Object[]{idVal, getDomLookup(identifiers.get(i).getType())});

            PatientCollection patients = PatientAssembler.createPatientCollectionFromPatient(patientList);

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

    return null;

}
项目:openMAXIMS    文件:DischargeSummaryScheduleImpl.java   
private Patient getPatientForCareContext(CareContextRefVo careContext) 
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
    throw new CodingRuntimeException("CareContext is null or id not provided for getPatientForCareContext");    

    DomainFactory factory = getDomainFactory();
    List pat = factory.find("select careSpell.patient from CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    PatientCollection patVo = PatientAssembler.createPatientCollectionFromPatient(pat);     

    return patVo != null && patVo.size() > 0 ? patVo.get(0) : null;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKImpl.java   
private Patient getPatientForCareContext(CareContextRefVo careContext) 
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
    throw new CodingRuntimeException("CareContext is null or id not provided for getPatientForCareContext");    

    DomainFactory factory = getDomainFactory();
    List pat = factory.find("select careSpell.patient rom CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    PatientCollection patVo = PatientAssembler.createPatientCollectionFromPatient(pat);     

    return patVo != null && patVo.size() > 0 ? patVo.get(0) : null;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private Patient getPatientForCareContext(CareContextRefVo careContext) 
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
    throw new CodingRuntimeException("CareContext is null or id not provided for getPatientForCareContext");    

    DomainFactory factory = getDomainFactory();
    List pat = factory.find("select careSpell.patient rom CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    PatientCollection patVo = PatientAssembler.createPatientCollectionFromPatient(pat);     

    return patVo != null && patVo.size() > 0 ? patVo.get(0) : null;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private Patient getPatientForCareContext(CareContextRefVo careContext) 
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
    throw new CodingRuntimeException("CareContext is null or id not provided for getPatientForCareContext");    

    DomainFactory factory = getDomainFactory();
    List pat = factory.find("select careSpell.patient rom CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    PatientCollection patVo = PatientAssembler.createPatientCollectionFromPatient(pat);     

    return patVo != null && patVo.size() > 0 ? patVo.get(0) : null;
}
项目:openmaxims-linux    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private Patient getPatientForCareContext(CareContextRefVo careContext) 
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
    throw new CodingRuntimeException("CareContext is null or id not provided for getPatientForCareContext");    

    DomainFactory factory = getDomainFactory();
    List pat = factory.find("select careSpell.patient rom CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    PatientCollection patVo = PatientAssembler.createPatientCollectionFromPatient(pat);     

    return patVo != null && patVo.size() > 0 ? patVo.get(0) : null;
}