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

项目:AvoinApotti    文件:ADTImpl.java   
private PendingEmergencyAdmissionVoCollection listPendingEmergencyAdmissions(DomainFactory factory, PatientShort patVo, PasEventVo pasEvent)
{
    String hql = "from PendingEmergencyAdmission pea " + 
                " where pea.pasEvent.patient.id = :pat " + 
                " and pea.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("pat");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(patVo.getID_Patient());
    values.add(pasEvent.getID_PASEvent());

    return PendingEmergencyAdmissionVoAssembler.createPendingEmergencyAdmissionVoCollectionFromPendingEmergencyAdmission(getDomainFactory().find(hql.toString(), labels, values));
}
项目:AvoinApotti    文件:ADTImpl.java   
@SuppressWarnings("unchecked")
public PendingEmergencyAdmissionVo getPendingEmergencyAdmission(
        PasEventVo pasEventVo) {
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from PendingEmergencyAdmission o where o.pasEvent.id = :pasEvent";
        List lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return PendingEmergencyAdmissionVoAssembler.create((PendingEmergencyAdmission) lst.get(0));
    }

    return null;
}
项目:openMAXIMS    文件:ADTImpl.java   
private PendingEmergencyAdmissionVoCollection listPendingEmergencyAdmissions(DomainFactory factory, PatientShort patVo, PasEventVo pasEvent)
{
    String hql = "from PendingEmergencyAdmission pea " + 
                " where pea.pasEvent.patient.id = :pat " + 
                " and pea.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("pat");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(patVo.getID_Patient());
    values.add(pasEvent.getID_PASEvent());

    return PendingEmergencyAdmissionVoAssembler.createPendingEmergencyAdmissionVoCollectionFromPendingEmergencyAdmission(getDomainFactory().find(hql.toString(), labels, values));
}
项目:openMAXIMS    文件:ADTImpl.java   
@SuppressWarnings("unchecked")
public PendingEmergencyAdmissionVo getPendingEmergencyAdmission(
        PasEventVo pasEventVo) {
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from PendingEmergencyAdmission o where o.pasEvent.id = :pasEvent";
        List lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return PendingEmergencyAdmissionVoAssembler.create((PendingEmergencyAdmission) lst.get(0));
    }

    return null;
}
项目:openMAXIMS    文件:ADTImpl.java   
private PendingEmergencyAdmissionVoCollection listPendingEmergencyAdmissions(DomainFactory factory, PatientShort patVo, PasEventVo pasEvent)
{
    String hql = "from PendingEmergencyAdmission pea " + 
                " where pea.pasEvent.patient.id = :pat " + 
                " and pea.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("pat");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(patVo.getID_Patient());
    values.add(pasEvent.getID_PASEvent());

    return PendingEmergencyAdmissionVoAssembler.createPendingEmergencyAdmissionVoCollectionFromPendingEmergencyAdmission(getDomainFactory().find(hql.toString(), labels, values));
}
项目:openMAXIMS    文件:ADTImpl.java   
@SuppressWarnings("unchecked")
public PendingEmergencyAdmissionVo getPendingEmergencyAdmission(
        PasEventVo pasEventVo) {
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from PendingEmergencyAdmission o where o.pasEvent.id = :pasEvent";
        List lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return PendingEmergencyAdmissionVoAssembler.create((PendingEmergencyAdmission) lst.get(0));
    }

    return null;
}
项目:openmaxims-linux    文件:ADTImpl.java   
private PendingEmergencyAdmissionVoCollection listPendingEmergencyAdmissions(DomainFactory factory, PatientShort patVo, PasEventVo pasEvent)
{
    String hql = "from PendingEmergencyAdmission pea " + 
                " where pea.pasEvent.patient.id = :pat " + 
                " and pea.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("pat");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(patVo.getID_Patient());
    values.add(pasEvent.getID_PASEvent());

    return PendingEmergencyAdmissionVoAssembler.createPendingEmergencyAdmissionVoCollectionFromPendingEmergencyAdmission(getDomainFactory().find(hql.toString(), labels, values));
}
项目:openmaxims-linux    文件:ADTImpl.java   
@SuppressWarnings("unchecked")
public PendingEmergencyAdmissionVo getPendingEmergencyAdmission(
        PasEventVo pasEventVo) {
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from PendingEmergencyAdmission o where o.pasEvent.id = :pasEvent";
        List lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return PendingEmergencyAdmissionVoAssembler.create((PendingEmergencyAdmission) lst.get(0));
    }

    return null;
}
项目:AvoinApotti    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }
项目:openMAXIMS    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }
项目:openMAXIMS    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }
项目:openmaxims-linux    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }