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

项目:AvoinApotti    文件:DemographicsImpl.java   
private PathwayRTTStatus createPathwRTTStatus(int nationalCode) throws StaleObjectException //WDEV-18326
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    return rttSTatusDO;
}
项目:AvoinApotti    文件:MOSQueryImpl.java   
private IMos[] listAllMOS(String name) 
{
    if(name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Can not search on null name.");

    DomainFactory factory = getDomainFactory();

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

    String hql = " from MemberOfStaff mos where mos.isActive = :isActive and (mos.name.upperSurname like :mosSname or mos.name.upperForename like :mosFname)";

    markers.add("isActive");
    values.add(Boolean.TRUE);
    markers.add("mosSname");
    values.add(name.toUpperCase() + "%");
    markers.add("mosFname");
    values.add(name.toUpperCase() + "%");

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

    List mosColl = factory.find(hql, markers, values, 400); //WDEV-11656

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(mosColl).toIMosArray();
}
项目:AvoinApotti    文件:BedInfoDialogImpl.java   
private PathwayRTTStatus createNewStausBasedOnThePreviousStatus(PathwayRTTStatus doPreviousCurrentPathwayRttStatus)
{
    if(doPreviousCurrentPathwayRttStatus != null)
    {
        PathwayRTTStatus rttStatusDO = new PathwayRTTStatus();

        rttStatusDO.setRTTStatus(doPreviousCurrentPathwayRttStatus.getRTTStatus());

        Object mos = getMosUser();
        MemberOfStaff doMos = null;

        if(mos instanceof MemberOfStaffLiteVo)
        {
            doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
        }

        rttStatusDO.setStatusBy(doMos);
        rttStatusDO.setStatusDateTime(new java.util.Date());
        rttStatusDO.setSetting("I");

        return rttStatusDO;
    }
    return null;
}
项目:AvoinApotti    文件:ICPConfigImpl.java   
public MemberOfStaffLiteVoCollection listContactPersons(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from MemberOfStaff as mos");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(mos.name.surname) like :NAME or UPPER(mos.name.forename) like :NAME");

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

    // Set order mode
    hqlQuery.append(" order by UPPER(mos.name.surname) asc");

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:AvoinApotti    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:AvoinApotti    文件:TheatreAdmissionImpl.java   
private PathwayRTTStatus createPathwayRTTStatus(CatsReferral domCats)
{
    if(!ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue())
        return null;

    if(domCats == null)
        return null;

    RTTStatusPoint rttStatusPoint = getRTTStatusPoint(START_OF_FIRST_DEFINITIVE_TREATMENT);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
    pathwayRTTStatus.setRTTStatus(rttStatusPoint);
    pathwayRTTStatus.setStatusBy(doMos);
    pathwayRTTStatus.setStatusDateTime(new Date());

    if(domCats.getJourney() != null && domCats.getJourney().getCurrentClock() != null)
    {
        domCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);

        if(domCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
            domCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());

        domCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
    }

    return pathwayRTTStatus;
}
项目:AvoinApotti    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:AvoinApotti    文件:ClinicListwithICPActionsImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:PendingEmergencyWorklistImpl.java   
public ims.core.vo.MemberOfStaffLiteVoCollection listAcceptingConsultants(String name)
{
    if (name == null || name.length() == 0)
        return null;

    StringBuilder query = new StringBuilder("SELECT mos FROM Medic AS medic LEFT JOIN medic.mos AS mos LEFT JOIN medic.grade AS grade ");
    query.append(" WHERE ");
    query.append(" grade.id = :CONSULTANT AND (mos.name.upperSurname LIKE :SURNAME OR mos.name.upperForename LIKE :FORENAME) ");
    query.append(" ORDER BY mos.name.upperSurname, mos.name.upperForename ");

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

    paramNames.add("CONSULTANT");       paramValues.add(MedicGrade.CONS.getID());
    paramNames.add("SURNAME");          paramValues.add("%" + name.toUpperCase() + "%");
    paramNames.add("FORENAME");         paramValues.add("%" + name.toUpperCase() + "%");

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:DemographicsImpl.java   
private PathwayRTTStatus createPathwRTTStatus(int nationalCode,boolean isInpatient, java.util.Date eventDateTime) ///WDEV-23292 throws StaleObjectException //WDEV-18326
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);
    if(isInpatient)                     //WDEV-23292
        rttSTatusDO.setSetting("I");    //WDEV-23292


    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(eventDateTime);

    return rttSTatusDO;
}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
private PathwayRTTStatus createPathwRTTStatus(int nationalCode,boolean isInpatient, java.util.Date eventDateTime) throws StaleObjectException //WDEV-18326 //WDEV-//WDEV-23292
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);
    if(isInpatient)                     //WDEV-23292
        rttSTatusDO.setSetting("I");    //WDEV-23292

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(eventDateTime);

    return rttSTatusDO;
}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
private FutureAppointmentDetails removeFutureAppointment(FutureAppointmentDetails item, Date removalDate)
{
    if (item == null)
        return null;
    ims.scheduling.domain.objects.FutureAppointmentStatus removalStatus = new ims.scheduling.domain.objects.FutureAppointmentStatus();

    removalStatus.setPendingStatus(getDomLookup(FutureAppointmentStatus.REMOVED));
    removalStatus.setStatusDateTime(removalDate != null ? removalDate.getDate() : new java.util.Date());
    Object mosUser = getMosUser();
    if (mosUser != null)
    {   
        removalStatus.setAuthoringUser(MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mosUser));
    }
    removalStatus.setRemovalReason(getDomLookup(FutureApptRemovalReason.PATIENT_DIED));

    item.setCurrentStatus(removalStatus);
    if (item.getStatusHistory() == null)
        item.setStatusHistory(new java.util.ArrayList());
    item.getStatusHistory().add(removalStatus);

    return item;    
}
项目:openMAXIMS    文件:WardAttenderImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode, java.util.Date eventDateTime) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(eventDateTime);

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:MOSQueryImpl.java   
private IMos[] listAllMOS(String name) 
{
    if(name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Can not search on null name.");

    DomainFactory factory = getDomainFactory();

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

    String hql = " from MemberOfStaff mos where mos.isActive = :isActive and (mos.name.upperSurname like :mosSname or mos.name.upperForename like :mosFname)";

    markers.add("isActive");
    values.add(Boolean.TRUE);
    markers.add("mosSname");
    values.add(name.toUpperCase() + "%");
    markers.add("mosFname");
    values.add(name.toUpperCase() + "%");

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

    List mosColl = factory.find(hql, markers, values, 400); //WDEV-11656

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(mosColl).toIMosArray();
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
private PathwayRTTStatus createNewStausBasedOnThePreviousStatus(PathwayRTTStatus doPreviousCurrentPathwayRttStatus)
{
    if(doPreviousCurrentPathwayRttStatus != null)
    {
        PathwayRTTStatus rttStatusDO = new PathwayRTTStatus();

        rttStatusDO.setRTTStatus(doPreviousCurrentPathwayRttStatus.getRTTStatus());

        Object mos = getMosUser();
        MemberOfStaff doMos = null;

        if(mos instanceof MemberOfStaffLiteVo)
        {
            doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
        }

        rttStatusDO.setStatusBy(doMos);
        // WDEV-23646 - Ensure the correct event Date Time is used when creating a new RTT Status
        rttStatusDO.setStatusDateTime(doPreviousCurrentPathwayRttStatus.getStatusDateTime());
        rttStatusDO.setSetting("I");

        return rttStatusDO;
    }
    return null;
}
项目:openMAXIMS    文件:ICPConfigImpl.java   
public MemberOfStaffLiteVoCollection listContactPersons(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from MemberOfStaff as mos");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where mos.name.upperSurname like :NAME or mos.name.upperForename like :NAME"); //WDEV-20219

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

    // Set order mode
    hqlQuery.append(" order by mos.name.upperSurname asc"); //WDEV-20219

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode, java.util.Date eventDateTime) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(eventDateTime);

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:ReferralTriageImpl.java   
private PathwayRTTStatus createPathwayRTTStatus(int nationalCode, java.util.Date eventDateTime) throws DomainInterfaceException
{
    if(!ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue())
        return null;

    RTTStatusPoint rttStatusPoint = getRTTStatusPoint(nationalCode);

    if (rttStatusPoint == null)
        throw new DomainInterfaceException("No RTT Status Point was found for National Code: " + nationalCode);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
    pathwayRTTStatus.setRTTStatus(rttStatusPoint);
    pathwayRTTStatus.setStatusBy(doMos);
    pathwayRTTStatus.setStatusDateTime(eventDateTime);

    return pathwayRTTStatus;
}
项目:openMAXIMS    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode, java.util.Date eventDateTime) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(eventDateTime);

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:ClinicListwithICPActionsImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode, java.util.Date eventDateTime) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(eventDateTime);

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:DemographicsImpl.java   
private PathwayRTTStatus createPathwRTTStatus(int nationalCode) throws StaleObjectException //WDEV-18326
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    return rttSTatusDO;
}
项目:openMAXIMS    文件:MOSQueryImpl.java   
private IMos[] listAllMOS(String name) 
{
    if(name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Can not search on null name.");

    DomainFactory factory = getDomainFactory();

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

    String hql = " from MemberOfStaff mos where mos.isActive = :isActive and (mos.name.upperSurname like :mosSname or mos.name.upperForename like :mosFname)";

    markers.add("isActive");
    values.add(Boolean.TRUE);
    markers.add("mosSname");
    values.add(name.toUpperCase() + "%");
    markers.add("mosFname");
    values.add(name.toUpperCase() + "%");

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

    List mosColl = factory.find(hql, markers, values, 400); //WDEV-11656

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(mosColl).toIMosArray();
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
private PathwayRTTStatus createNewStausBasedOnThePreviousStatus(PathwayRTTStatus doPreviousCurrentPathwayRttStatus)
{
    if(doPreviousCurrentPathwayRttStatus != null)
    {
        PathwayRTTStatus rttStatusDO = new PathwayRTTStatus();

        rttStatusDO.setRTTStatus(doPreviousCurrentPathwayRttStatus.getRTTStatus());

        Object mos = getMosUser();
        MemberOfStaff doMos = null;

        if(mos instanceof MemberOfStaffLiteVo)
        {
            doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
        }

        rttStatusDO.setStatusBy(doMos);
        rttStatusDO.setStatusDateTime(new java.util.Date());
        rttStatusDO.setSetting("I");

        return rttStatusDO;
    }
    return null;
}
项目:openMAXIMS    文件:ICPConfigImpl.java   
public MemberOfStaffLiteVoCollection listContactPersons(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from MemberOfStaff as mos");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(mos.name.surname) like :NAME or UPPER(mos.name.forename) like :NAME");

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

    // Set order mode
    hqlQuery.append(" order by UPPER(mos.name.surname) asc");

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openMAXIMS    文件:ClinicListwithICPActionsImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openmaxims-linux    文件:DemographicsImpl.java   
private PathwayRTTStatus createPathwRTTStatus(int nationalCode) throws StaleObjectException //WDEV-18326
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    return rttSTatusDO;
}
项目:openmaxims-linux    文件:MOSQueryImpl.java   
private IMos[] listAllMOS(String name) 
{
    if(name == null || (name != null && name.length() == 0))
        throw new DomainRuntimeException("Can not search on null name.");

    DomainFactory factory = getDomainFactory();

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

    String hql = " from MemberOfStaff mos where mos.isActive = :isActive and (mos.name.upperSurname like :mosSname or mos.name.upperForename like :mosFname)";

    markers.add("isActive");
    values.add(Boolean.TRUE);
    markers.add("mosSname");
    values.add(name.toUpperCase() + "%");
    markers.add("mosFname");
    values.add(name.toUpperCase() + "%");

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

    List mosColl = factory.find(hql, markers, values, 400); //WDEV-11656

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(mosColl).toIMosArray();
}
项目:openmaxims-linux    文件:BedInfoDialogImpl.java   
private PathwayRTTStatus createNewStausBasedOnThePreviousStatus(PathwayRTTStatus doPreviousCurrentPathwayRttStatus)
{
    if(doPreviousCurrentPathwayRttStatus != null)
    {
        PathwayRTTStatus rttStatusDO = new PathwayRTTStatus();

        rttStatusDO.setRTTStatus(doPreviousCurrentPathwayRttStatus.getRTTStatus());

        Object mos = getMosUser();
        MemberOfStaff doMos = null;

        if(mos instanceof MemberOfStaffLiteVo)
        {
            doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
        }

        rttStatusDO.setStatusBy(doMos);
        rttStatusDO.setStatusDateTime(new java.util.Date());
        rttStatusDO.setSetting("I");

        return rttStatusDO;
    }
    return null;
}
项目:openmaxims-linux    文件:ICPConfigImpl.java   
public MemberOfStaffLiteVoCollection listContactPersons(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from MemberOfStaff as mos");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(mos.name.surname) like :NAME or UPPER(mos.name.forename) like :NAME");

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

    // Set order mode
    hqlQuery.append(" order by UPPER(mos.name.surname) asc");

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:openmaxims-linux    文件:ClinicListImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:openmaxims-linux    文件:ClinicListwithICPActionsImpl.java   
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
    PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();

    RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);

    rttSTatusDO.setRTTStatus(rttStatusPoint);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    rttSTatusDO.setStatusBy(doMos);
    rttSTatusDO.setStatusDateTime(new java.util.Date());

    rttSTatusDO.setSetting("O");

    return rttSTatusDO;
}
项目:AvoinApotti    文件:UploadDocumentImpl.java   
public MemberOfStaffLiteVo getMoS(MemberOfStaffRefVo refVo) 
{
    if(refVo == null || 
            (refVo != null && refVo.getID_MemberOfStaff() == null))
                throw new DomainRuntimeException("Cannot get MemberOfStaffLiteVo for null MemberOfStaffRefVo");

    DomainFactory factory = getDomainFactory();     
    MemberOfStaff doMos = (MemberOfStaff) factory.getDomainObject(MemberOfStaff.class, refVo.getID_MemberOfStaff());
    return MemberOfStaffLiteVoAssembler.create(doMos);      
}
项目:AvoinApotti    文件:DocumentWorklistImpl.java   
public MemberOfStaffLiteVo getLockedUser(MemberOfStaffRefVo mos) 
{
    if(mos == null || mos.getID_MemberOfStaff() == null)
        throw new CodingRuntimeException("Can not get Member of Staf on null Id.");

    return MemberOfStaffLiteVoAssembler.create((MemberOfStaff) getDomainFactory().getDomainObject(MemberOfStaff.class, mos.getID_MemberOfStaff()));
}
项目:AvoinApotti    文件:BedInfoDialogImpl.java   
private PathwayRTTStatus createPathwayRTTStatus(CatsReferral doCats)
{
    if(doCats == null)
        return null;

    RTTStatusPoint rttStatusPoint = getRTTStatusPoint(START_OF_FIRST_DEFINITIVE_TREATMENT);
    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
    pathwayRTTStatus.setRTTStatus(rttStatusPoint);
    pathwayRTTStatus.setStatusBy(doMos);
    pathwayRTTStatus.setStatusDateTime(new java.util.Date());

    if(doCats.getJourney() != null && doCats.getJourney().getCurrentClock() != null)
    {
        doCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);

        if(doCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
            doCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());

        doCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
    }

    return pathwayRTTStatus;
}
项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
private PathwayRTTStatus createPathwayRTTStatus(CatsReferral domCats, boolean isDiagnostic) // WDEV-18617
{
    if(!ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue())
        return null;

    if(domCats == null)
        return null;

    RTTStatusPoint rttStatusPoint =null;
    if (isDiagnostic)
        rttStatusPoint= getRTTStatusPoint(SUBSEQUENT_ACTIVITY);
    else
        rttStatusPoint= getRTTStatusPoint(START_OF_FIRST_DEFINITIVE_TREATMENT);

    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
    pathwayRTTStatus.setRTTStatus(rttStatusPoint);
    pathwayRTTStatus.setStatusBy(doMos);
    pathwayRTTStatus.setStatusDateTime(new java.util.Date());

    if(domCats.getJourney() != null && domCats.getJourney().getCurrentClock() != null)
    {
        domCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);

        if(domCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
            domCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());

        domCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
    }

    return pathwayRTTStatus;
}
项目:AvoinApotti    文件:PatientICPImpl.java   
public void addActionStatus(PatientICPActionRefVo actionRef, ICPActionStatus status, Boolean hasCountersigningRight) throws DomainInterfaceException, StaleObjectException
{
    if(actionRef == null || actionRef.getID_PatientICPAction() == null)
        throw new CodingRuntimeException("PatientICPActionRefVo is null or has a null ID !");

    DomainFactory factory = getDomainFactory();

    PatientICPAction actionBo = (PatientICPAction) factory.loadDomainObject(PatientICPAction.class, actionRef.getID_PatientICPAction());

    PatientICPActionFullVo actionVo = PatientICPActionFullVoAssembler.create(actionBo);

    PatientICPActionStatusVo actionStatusVo = new PatientICPActionStatusVo();

    actionStatusVo.setStatusDate(new DateTime());
    actionStatusVo.setChangedBy(getSession().getUser() != null ? MemberOfStaffLiteVoAssembler.create((MemberOfStaff) getDomainFactory().getDomainObject(MemberOfStaff.class, getSession().getUser().getMosId())) : null);
    actionStatusVo.setStatus(status);

    actionVo.setCurrentStatus(actionStatusVo);
    actionVo.getStatusHistory().add(actionStatusVo);


    if (ICPActionStatus.MET.equals(status) || ICPActionStatus.NOT_MET.equals(status))
    {
        if (!Boolean.TRUE.equals(hasCountersigningRight) && Boolean.TRUE.equals(actionVo.getAction().getRequiresCounterSignature()))
        {
            actionVo.setRequiresCounterSigning(Boolean.TRUE);
        }
    }

    factory.save(PatientICPActionFullVoAssembler.extractPatientICPAction(factory, actionVo));
}
项目:AvoinApotti    文件:AppointmentOutcomeDialogImpl.java   
private void createPathwayRTTStatus(RTTStatusPointVo rttStatusPointVo, CatsReferral doCats)
{
    if(doCats == null || rttStatusPointVo == null)
        return;


    Object mos = getMosUser();
    MemberOfStaff doMos = null;

    if(mos instanceof MemberOfStaffLiteVo)
    {
        doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
    }

    PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
    pathwayRTTStatus.setRTTStatus(RTTStatusPointVoAssembler.extractRTTStatusPoint(getDomainFactory(), rttStatusPointVo));
    pathwayRTTStatus.setStatusBy(doMos);
    pathwayRTTStatus.setStatusDateTime(new Date());

    doCats.setCurrentRTTStatus(pathwayRTTStatus);
    if(doCats.getJourney() != null && doCats.getJourney().getCurrentClock() != null)
    {
        doCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);

        if(doCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
            doCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());

        doCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
    }
}
项目:AvoinApotti    文件:MosSearchImpl.java   
public MemberOfStaffLiteVoCollection listActiveMosByName(String name)
{
    if(name == null)
        throw new CodingRuntimeException("name parameter null in method listActiveMosByName");

    MemberOfStaffShortVo voFilter = new MemberOfStaffShortVo();
    voFilter.setName(new PersonName());
    voFilter.getName().setSurname(name);
    voFilter.setIsActive(Boolean.TRUE);

    return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(listDomMos(voFilter));
}