Java 类ims.emergency.vo.domain.PatientRelevantPMHVoAssembler 实例源码

项目:AvoinApotti    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVoCollection getAllRelevantPMH(PatientRefVo patientRefVo)
{
    DomainFactory factory = getDomainFactory();

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

    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
    {
        throw new CodingRuntimeException("Cannot get patientRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select pmh from PatientRelevantPMH as pmh left join pmh.patient as pat where pat.id = :patientID");
    hql.append(" order by pmh.attendance.startDateTime desc");

    markers.add("patientID");
    values.add(patientRefVo.getID_Patient());

    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(factory.find(hql.toString(), markers, values));
}
项目:AvoinApotti    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo getRelevantPMH(CareContextRefVo careContextRefVo)
{
    DomainFactory factory = getDomainFactory();

    if (careContextRefVo == null || careContextRefVo.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get careContextRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select PMH from PatientRelevantPMH as PMH left join PMH.attendance as contextID where contextID.id = :contextID");

    List<?>  list =  factory.find(hql.toString(), new String[] {"contextID"}, new Object[] {careContextRefVo.getID_CareContext()});

    if (list!=null && list.size()>0)
    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(list).get(0);

    return null;
}
项目:openMAXIMS    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVoCollection getAllRelevantPMH(PatientRefVo patientRefVo)
{
    DomainFactory factory = getDomainFactory();

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

    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
    {
        throw new CodingRuntimeException("Cannot get patientRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select pmh from PatientRelevantPMH as pmh left join pmh.patient as pat where pat.id = :patientID");
    hql.append(" order by pmh.attendance.startDateTime desc");

    markers.add("patientID");
    values.add(patientRefVo.getID_Patient());

    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo getRelevantPMH(CareContextRefVo careContextRefVo)
{
    DomainFactory factory = getDomainFactory();

    if (careContextRefVo == null || careContextRefVo.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get careContextRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select PMH from PatientRelevantPMH as PMH left join PMH.attendance as contextID where contextID.id = :contextID");

    List<?>  list =  factory.find(hql.toString(), new String[] {"contextID"}, new Object[] {careContextRefVo.getID_CareContext()});

    if (list!=null && list.size()>0)
    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(list).get(0);

    return null;
}
项目:openMAXIMS    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVoCollection getAllRelevantPMH(PatientRefVo patientRefVo)
{
    DomainFactory factory = getDomainFactory();

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

    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
    {
        throw new CodingRuntimeException("Cannot get patientRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select pmh from PatientRelevantPMH as pmh left join pmh.patient as pat where pat.id = :patientID");
    hql.append(" order by pmh.attendance.startDateTime desc");

    markers.add("patientID");
    values.add(patientRefVo.getID_Patient());

    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo getRelevantPMH(CareContextRefVo careContextRefVo)
{
    DomainFactory factory = getDomainFactory();

    if (careContextRefVo == null || careContextRefVo.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get careContextRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select PMH from PatientRelevantPMH as PMH left join PMH.attendance as contextID where contextID.id = :contextID");

    List<?>  list =  factory.find(hql.toString(), new String[] {"contextID"}, new Object[] {careContextRefVo.getID_CareContext()});

    if (list!=null && list.size()>0)
    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(list).get(0);

    return null;
}
项目:openmaxims-linux    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVoCollection getAllRelevantPMH(PatientRefVo patientRefVo)
{
    DomainFactory factory = getDomainFactory();

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

    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
    {
        throw new CodingRuntimeException("Cannot get patientRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select pmh from PatientRelevantPMH as pmh left join pmh.patient as pat where pat.id = :patientID");
    hql.append(" order by pmh.attendance.startDateTime desc");

    markers.add("patientID");
    values.add(patientRefVo.getID_Patient());

    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(factory.find(hql.toString(), markers, values));
}
项目:openmaxims-linux    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo getRelevantPMH(CareContextRefVo careContextRefVo)
{
    DomainFactory factory = getDomainFactory();

    if (careContextRefVo == null || careContextRefVo.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get careContextRefVo on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select PMH from PatientRelevantPMH as PMH left join PMH.attendance as contextID where contextID.id = :contextID");

    List<?>  list =  factory.find(hql.toString(), new String[] {"contextID"}, new Object[] {careContextRefVo.getID_CareContext()});

    if (list!=null && list.size()>0)
    return PatientRelevantPMHVoAssembler.createPatientRelevantPMHVoCollectionFromPatientRelevantPMH(list).get(0);

    return null;
}
项目:AvoinApotti    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo savePatientPMH(PatientRelevantPMHVo patientPMHToSave) throws StaleObjectException, UniqueKeyViolationException
{
    if (patientPMHToSave == null)
        throw new CodingRuntimeException("Cannot save null PatientPMH");

    if (!patientPMHToSave.isValidated())
        throw new DomainRuntimeException("PatientPMHVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    PatientRelevantPMH domainPatientPMH = PatientRelevantPMHVoAssembler.extractPatientRelevantPMH(factory, patientPMHToSave);

    factory.save(domainPatientPMH);

    return PatientRelevantPMHVoAssembler.create(domainPatientPMH);
}
项目:openMAXIMS    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo savePatientPMH(PatientRelevantPMHVo patientPMHToSave) throws StaleObjectException, UniqueKeyViolationException
{
    if (patientPMHToSave == null)
        throw new CodingRuntimeException("Cannot save null PatientPMH");

    if (!patientPMHToSave.isValidated())
        throw new DomainRuntimeException("PatientPMHVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    PatientRelevantPMH domainPatientPMH = PatientRelevantPMHVoAssembler.extractPatientRelevantPMH(factory, patientPMHToSave);

    factory.save(domainPatientPMH);

    return PatientRelevantPMHVoAssembler.create(domainPatientPMH);
}
项目:openMAXIMS    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo savePatientPMH(PatientRelevantPMHVo patientPMHToSave) throws StaleObjectException, UniqueKeyViolationException
{
    if (patientPMHToSave == null)
        throw new CodingRuntimeException("Cannot save null PatientPMH");

    if (!patientPMHToSave.isValidated())
        throw new DomainRuntimeException("PatientPMHVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    PatientRelevantPMH domainPatientPMH = PatientRelevantPMHVoAssembler.extractPatientRelevantPMH(factory, patientPMHToSave);

    factory.save(domainPatientPMH);

    return PatientRelevantPMHVoAssembler.create(domainPatientPMH);
}
项目:openmaxims-linux    文件:RelevantPMHImpl.java   
public PatientRelevantPMHVo savePatientPMH(PatientRelevantPMHVo patientPMHToSave) throws StaleObjectException, UniqueKeyViolationException
{
    if (patientPMHToSave == null)
        throw new CodingRuntimeException("Cannot save null PatientPMH");

    if (!patientPMHToSave.isValidated())
        throw new DomainRuntimeException("PatientPMHVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    PatientRelevantPMH domainPatientPMH = PatientRelevantPMHVoAssembler.extractPatientRelevantPMH(factory, patientPMHToSave);

    factory.save(domainPatientPMH);

    return PatientRelevantPMHVoAssembler.create(domainPatientPMH);
}