Java 类ims.emergency.vo.SeenByHCPVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedWaitingPatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedWaitingPatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedWaitingPatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnStartTriageClick() throws PresentationLogicException 
{
    //wdev-15930
    form.getLocalContext().setAllocatedNurse(null); 

    if(domain.getHcpUser() instanceof Hcp)
    {
        Hcp temp = (Hcp)domain.getHcpUser();
        if(temp != null)
        {
            HcpDisType hcptype =getParentNodeHcp(temp.getHcpType()); 
            if( hcptype != null && hcptype.equals(HcpDisType.NURSING))
                form.getLocalContext().setAllocatedNurse(new SeenByHCPVo());//wdev-16816
        }
    }
    //---------
    if( saveTracking())
    {
        open();
        //wdev-15930
        if( form.getLocalContext().getAllocatedNurse() == null )
            engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog, new Object[]{Boolean.TRUE});   //wdev-15930    //WDEV-16816
    }
}
项目:AvoinApotti    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:AvoinApotti    文件:EDAssessmentComponentImpl.java   
public SeenByHCPVo getFirstSeenByHCP(CareContextRefVo careContextRef) 
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where (allSeenBy.attendance.id = :attID and allSeenBy.allocatedMedic is not null) order by allSeenBy.seenDateTime asc");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });
    if( list != null && list.size() >  0)
    {
        return SeenByHCPVoAssembler.create((SeenByHCP) list.get(0));

    }

    return null;
}
项目:AvoinApotti    文件:EDSeenByAndCompleteDialogImpl.java   
public Boolean isStale(ims.emergency.vo.SeenByHCPVo seenByHcp)
{
    if (seenByHcp == null || seenByHcp.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    SeenByHCP domainSeenByToSave = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHcp.getID_SeenByHCP());

    if (domainSeenByToSave == null)
    {
        return true;
    }

    if (domainSeenByToSave.getVersion() > seenByHcp.getVersion_SeenByHCP())
    {
        return true;
    }

    return false;
}
项目:AvoinApotti    文件:EDSeenByAndCompleteDialogImpl.java   
public SeenByHCPVo getUncompletedSeenByHCPCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where allSeenBy.attendance.id = :attID and allSeenBy.completedDateTime is null  order by allSeenBy.allocatedDateTime desc ");

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

    if (list!=null && list.size()>0)
        return SeenByHCPVoAssembler.create((SeenByHCP)list.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnStartTriageClick() throws PresentationLogicException 
{
    //wdev-15930
    form.getLocalContext().setAllocatedNurse(null); 

    if(domain.getHcpUser() instanceof Hcp)
    {
        Hcp temp = (Hcp)domain.getHcpUser();
        if(temp != null)
        {
            HcpDisType hcptype =getParentNodeHcp(temp.getHcpType()); 
            if( hcptype != null && hcptype.equals(HcpDisType.NURSING))
                form.getLocalContext().setAllocatedNurse(new SeenByHCPVo());//wdev-16816
        }
    }
    //---------
    if( saveTracking())
    {
        open();
        //wdev-15930
        if( form.getLocalContext().getAllocatedNurse() == null )
            engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog, new Object[]{Boolean.TRUE});   //wdev-15930    //WDEV-16816
    }
}
项目:openMAXIMS    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openMAXIMS    文件:EDSeenByAndCompleteDialogImpl.java   
public Boolean isStale(ims.emergency.vo.SeenByHCPVo seenByHcp)
{
    if (seenByHcp == null || seenByHcp.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    SeenByHCP domainSeenByToSave = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHcp.getID_SeenByHCP());

    if (domainSeenByToSave == null)
    {
        return true;
    }

    if (domainSeenByToSave.getVersion() > seenByHcp.getVersion_SeenByHCP())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:EDSeenByAndCompleteDialogImpl.java   
public SeenByHCPVo getUncompletedSeenByHCPCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where allSeenBy.attendance.id = :attID and allSeenBy.allocatedMedic is not null and allSeenBy.completedDateTime is null  order by allSeenBy.allocatedDateTime desc ");

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

    if (list!=null && list.size()>0)
        return SeenByHCPVoAssembler.create((SeenByHCP)list.get(0));

    return null;
}
项目:openMAXIMS    文件:EDSeenByAndCompleteDialogImpl.java   
public void markSeenByHCPAsRIE(SeenByHCPVo seenByHCP, TrackingForSeenByHCPVo tracking, FormName formName, Integer patientId, Integer careContextId, String rieMessage) throws StaleObjectException
{
    if(seenByHCP == null)
        return;

    if(seenByHCP.getSeenByHCPNotes() != null)
    {
        for(AttendanceClinicalNotesVo note : seenByHCP.getSeenByHCPNotes())
        {
            if(note == null)
                continue;

            markAsRie(note, formName, patientId, null, careContextId, rieMessage);
        }
    }

    markAsRie(seenByHCP, formName, patientId, null, careContextId, rieMessage);

    if(tracking != null)
    {
        DomainFactory factory = getDomainFactory();
        factory.save(TrackingForSeenByHCPVoAssembler.extractTracking(factory, tracking));
    }
}
项目:openMAXIMS    文件:EDSeenByNurseAndCompleteImpl.java   
public Boolean isStale(ims.emergency.vo.SeenByHCPVo seenByHcp)
{
    if (seenByHcp == null || seenByHcp.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    SeenByHCP domainSeenByToSave = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHcp.getID_SeenByHCP());

    if (domainSeenByToSave == null)
    {
        return true;
    }

    if (domainSeenByToSave.getVersion() > seenByHcp.getVersion_SeenByHCP())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:EDSeenByNurseAndCompleteImpl.java   
public SeenByHCPVo getUncompletedSeenByHCPCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where allSeenBy.attendance.id = :attID and allSeenBy.allocatedNurse is not null and  allSeenBy.completedDateTime is null  order by allSeenBy.allocatedDateTime desc ");

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

    if (list!=null && list.size()>0)
        return SeenByHCPVoAssembler.create((SeenByHCP)list.get(0));

    return null;
}
项目:openMAXIMS    文件:EDSeenByNurseAndCompleteImpl.java   
public void markSeenByHCPAsRIE(SeenByHCPVo seenByHCP, TrackingForSeenByHCPVo tracking, FormName formName, Integer patientId, Integer careContextId, String rieMessage) throws StaleObjectException
{
    if(seenByHCP == null)
        return;

    if(seenByHCP.getSeenByHCPNotes() != null)
    {
        for(AttendanceClinicalNotesVo note : seenByHCP.getSeenByHCPNotes())
        {
            if(note == null)
                continue;

            markAsRie(note, formName, patientId, null, careContextId, rieMessage);
        }
    }

    markAsRie(seenByHCP, formName, patientId, null, careContextId, rieMessage);

    if(tracking != null)
    {
        DomainFactory factory = getDomainFactory();
        factory.save(TrackingForSeenByHCPVoAssembler.extractTracking(factory, tracking));
    }
}
项目:openMAXIMS    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedWaitingPatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedWaitingPatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedWaitingPatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnStartTriageClick() throws PresentationLogicException 
{
    //wdev-15930
    form.getLocalContext().setAllocatedNurse(null); 

    if(domain.getHcpUser() instanceof Hcp)
    {
        Hcp temp = (Hcp)domain.getHcpUser();
        if(temp != null)
        {
            HcpDisType hcptype =getParentNodeHcp(temp.getHcpType()); 
            if( hcptype != null && hcptype.equals(HcpDisType.NURSING))
                form.getLocalContext().setAllocatedNurse(new SeenByHCPVo());//wdev-16816
        }
    }
    //---------
    if( saveTracking())
    {
        open();
        //wdev-15930
        if( form.getLocalContext().getAllocatedNurse() == null )
            engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog, new Object[]{Boolean.TRUE});   //wdev-15930    //WDEV-16816
    }
}
项目:openMAXIMS    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openMAXIMS    文件:EDAssessmentComponentImpl.java   
public SeenByHCPVo getFirstSeenByHCP(CareContextRefVo careContextRef) 
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where (allSeenBy.attendance.id = :attID and allSeenBy.allocatedMedic is not null) order by allSeenBy.seenDateTime asc");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });
    if( list != null && list.size() >  0)
    {
        return SeenByHCPVoAssembler.create((SeenByHCP) list.get(0));

    }

    return null;
}
项目:openMAXIMS    文件:EDSeenByAndCompleteDialogImpl.java   
public Boolean isStale(ims.emergency.vo.SeenByHCPVo seenByHcp)
{
    if (seenByHcp == null || seenByHcp.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    SeenByHCP domainSeenByToSave = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHcp.getID_SeenByHCP());

    if (domainSeenByToSave == null)
    {
        return true;
    }

    if (domainSeenByToSave.getVersion() > seenByHcp.getVersion_SeenByHCP())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:EDSeenByAndCompleteDialogImpl.java   
public SeenByHCPVo getUncompletedSeenByHCPCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where allSeenBy.attendance.id = :attID and allSeenBy.completedDateTime is null  order by allSeenBy.allocatedDateTime desc ");

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

    if (list!=null && list.size()>0)
        return SeenByHCPVoAssembler.create((SeenByHCP)list.get(0));

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedWaitingPatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedWaitingPatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedWaitingPatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnStartTriageClick() throws PresentationLogicException 
{
    //wdev-15930
    form.getLocalContext().setAllocatedNurse(null); 

    if(domain.getHcpUser() instanceof Hcp)
    {
        Hcp temp = (Hcp)domain.getHcpUser();
        if(temp != null)
        {
            HcpDisType hcptype =getParentNodeHcp(temp.getHcpType()); 
            if( hcptype != null && hcptype.equals(HcpDisType.NURSING))
                form.getLocalContext().setAllocatedNurse(new SeenByHCPVo());//wdev-16816
        }
    }
    //---------
    if( saveTracking())
    {
        open();
        //wdev-15930
        if( form.getLocalContext().getAllocatedNurse() == null )
            engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog, new Object[]{Boolean.TRUE});   //wdev-15930    //WDEV-16816
    }
}
项目:openmaxims-linux    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openmaxims-linux    文件:EDAssessmentComponentImpl.java   
public SeenByHCPVo getFirstSeenByHCP(CareContextRefVo careContextRef) 
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where (allSeenBy.attendance.id = :attID and allSeenBy.allocatedMedic is not null) order by allSeenBy.seenDateTime asc");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });
    if( list != null && list.size() >  0)
    {
        return SeenByHCPVoAssembler.create((SeenByHCP) list.get(0));

    }

    return null;
}
项目:openmaxims-linux    文件:EDSeenByAndCompleteDialogImpl.java   
public Boolean isStale(ims.emergency.vo.SeenByHCPVo seenByHcp)
{
    if (seenByHcp == null || seenByHcp.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    SeenByHCP domainSeenByToSave = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHcp.getID_SeenByHCP());

    if (domainSeenByToSave == null)
    {
        return true;
    }

    if (domainSeenByToSave.getVersion() > seenByHcp.getVersion_SeenByHCP())
    {
        return true;
    }

    return false;
}
项目:openmaxims-linux    文件:EDSeenByAndCompleteDialogImpl.java   
public SeenByHCPVo getUncompletedSeenByHCPCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSeenBy from SeenByHCP as allSeenBy where allSeenBy.attendance.id = :attID and allSeenBy.completedDateTime is null  order by allSeenBy.allocatedDateTime desc ");

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

    if (list!=null && list.size()>0)
        return SeenByHCPVoAssembler.create((SeenByHCP)list.get(0));

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistAndTriageVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveTracking( PatientMedsVo patmedVo) 
{
    if(form.getLocalContext().getSelectedWaitingPatient() == null)
        return false;

    TrackingForClinicianWorklistAndTriageVo tracking = populateTrackingWithTriage((TrackingForClinicianWorklistAndTriageVo) form.getLocalContext().getSelectedWaitingPatient().clone());

    if(tracking == null)
        return false;

    //wdev-15930
    SeenByHCPVo allocNurseVo = populateAllocatedNurse();    //wdev-15930 //WDEV-16816
    form.getLocalContext().setAllocatedNurse(allocNurseVo) ;//WDEV-16816

    String[] errors = tracking.validate();  
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        form.getLocalContext().setSelectedWaitingPatient(domain.saveTracking(tracking,form.getLocalContext().getAllocatedNurse(),patmedVo)); //wdev-15930 //WDEV-16816,wdev-17825
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        //open();
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveTracking() 
{
    if(form.getLocalContext().getSelectedTriagePatient() == null)
        return false;

    TrackingForTriageVo tracking = populateTrackingWithTriage((TrackingForTriageVo) form.getLocalContext().getSelectedTriagePatient().clone());

    if(tracking == null)
        return false;

    //wdev-15930
    SeenByHCPVo allocNurseVo = populateAllocatedNurse();    //wdev-15930 //wdev-16816
    form.getLocalContext().setAllocatedNurse(allocNurseVo) ;

    String[] errors = tracking.validate();  
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        form.getLocalContext().setSelectedTriagePatient(domain.saveTracking(tracking,form.getLocalContext().getAllocatedNurse())); //wdev-15930
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControls(SeenByHCPVo seenByHCP)
{
    clearInstanceControls();

    if (seenByHCP==null)
        return;

    form.ccSeenByMedic().setValue(seenByHCP.getAllocatedMedic());
    form.ccSeenByANP().setValue(seenByHCP.getAllocatedNurse());
    form.dtimSeen().setValue(seenByHCP.getSeenDateTime());
    form.dtimCompleted().setValue(seenByHCP.getCompletedDateTime());

    populateCommentGrid(seenByHCP.getSeenByHCPNotes());
}
项目:AvoinApotti    文件:TriageImpl.java   
public TrackingForTriageVo saveTracking(TrackingForTriageVo tracking, SeenByHCPVo seenByHCP) throws StaleObjectException     //wdev-15930  //WDEV-16816
{
    if(tracking == null)
        throw new CodingRuntimeException("Cannot save a null Tracking record.");

    if(!tracking.isValidated())
        throw new CodingRuntimeException("Tracking record is not validated.");

    DomainFactory factory = getDomainFactory();
    //wdev-15930
    //WDEV-16816
    SeenByHCP doSeenBy = null;
    if( seenByHCP != null ) 
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHCP);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------

    Tracking doTracking = TrackingForTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) //wdev-15930 //WDEV-16816
    {
        doTracking.setSeenBy(doSeenBy); //WDEV-16816
    }

    factory.save(doTracking);

    return TrackingForTriageVoAssembler.create(doTracking);
}
项目:AvoinApotti    文件:EDSeenByAndCompleteDialogImpl.java   
public ims.emergency.vo.SeenByHCPVo getSeenByHCP(ims.emergency.vo.SeenByHCPRefVo seenByHCP)
{
    if (seenByHCP == null || seenByHCP.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    SeenByHCP domainSeenBy = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHCP.getID_SeenByHCP());

    return SeenByHCPVoAssembler.create(domainSeenBy);
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(SeenByHCPVo seenByHCP)
{
    clearInstanceControls();

    if (seenByHCP==null)
        return;

    form.ccSeenByANP().setValue(seenByHCP.getAllocatedNurse());
    form.dtimSeen().setValue(seenByHCP.getSeenDateTime());
    form.dtimCompleted().setValue(seenByHCP.getCompletedDateTime());

    populateCommentGrid(seenByHCP.getSeenByHCPNotes());
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveTracking( PatientMedsVo patmedVo) 
{
    if(form.getLocalContext().getSelectedWaitingPatient() == null)
        return false;

    TrackingForClinicianWorklistAndTriageVo tracking = populateTrackingWithTriage((TrackingForClinicianWorklistAndTriageVo) form.getLocalContext().getSelectedWaitingPatient().clone());

    if(tracking == null)
        return false;

    //wdev-15930
    SeenByHCPVo allocHCPVo = populateAllocatedHCP();    //wdev-15930 //WDEV-16816
    //form.getLocalContext().setAllocatedNurse(allocNurseVo) ;//WDEV-16816

    String[] errors = tracking.validate();  
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        form.getLocalContext().setSelectedWaitingPatient(domain.saveTracking(tracking, allocHCPVo, patmedVo)); //wdev-15930 //WDEV-16816,wdev-17825
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        //open();
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveTracking() 
{
    if(form.getLocalContext().getSelectedTriagePatient() == null)
        return false;

    TrackingForTriageVo tracking = populateTrackingWithTriage((TrackingForTriageVo) form.getLocalContext().getSelectedTriagePatient().clone());

    if(tracking == null)
        return false;

    //wdev-15930
    SeenByHCPVo allocNurseVo = populateAllocatedNurse();    //wdev-15930 //wdev-16816
    form.getLocalContext().setAllocatedNurse(allocNurseVo) ;

    String[] errors = tracking.validate();  
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        form.getLocalContext().setSelectedTriagePatient(domain.saveTracking(tracking,form.getLocalContext().getAllocatedNurse())); //wdev-15930
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(SeenByHCPVo seenByHCP) //WDEV-17253
{
    clearInstanceControls();

    if (seenByHCP==null)
        return;

    form.ccSeenByMedic().setValue(seenByHCP.getAllocatedMedic());
    form.dtimSeen().setValue(seenByHCP.getSeenDateTime());
    form.dtimCompleted().setValue(seenByHCP.getCompletedDateTime());
    form.chkSignedOff().setValue(seenByHCP.getSignOff()); //WDEV-19293

    populateCommentGrid(seenByHCP.getSeenByHCPNotes());
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo saveTracking(TrackingForTriageVo tracking, SeenByHCPVo seenByHCP) throws StaleObjectException     //wdev-15930  //WDEV-16816
{
    if(tracking == null)
        throw new CodingRuntimeException("Cannot save a null Tracking record.");

    if(!tracking.isValidated())
        throw new CodingRuntimeException("Tracking record is not validated.");

    DomainFactory factory = getDomainFactory();
    //wdev-15930
    //WDEV-16816
    SeenByHCP doSeenBy = null;
    if( seenByHCP != null ) 
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHCP);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------

    Tracking doTracking = TrackingForTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) //wdev-15930 //WDEV-16816
    {
        doTracking.setSeenBy(doSeenBy); //WDEV-16816
    }

    factory.save(doTracking);

    return TrackingForTriageVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:EDSeenByAndCompleteDialogImpl.java   
public ims.emergency.vo.SeenByHCPVo getSeenByHCP(ims.emergency.vo.SeenByHCPRefVo seenByHCP)
{
    if (seenByHCP == null || seenByHCP.getID_SeenByHCP() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    SeenByHCP domainSeenBy = (SeenByHCP) factory.getDomainObject(SeenByHCP.class, seenByHCP.getID_SeenByHCP());

    return SeenByHCPVoAssembler.create(domainSeenBy);
}