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

项目:AvoinApotti    文件:Logic.java   
private void newInstance()
{
    clearFields();

    form.setMode(FormMode.EDIT);
    form.btnInactivate().setEnabled(false);
    form.btnUpdate().setEnabled(false);
    form.ctnDetails().customControlCodingItem().setClinicalTermMandatory(true);
    form.ctnDetails().customControlCodingItem().setDescriptionMandatory(true);

    PatientMedicationVo voMed = new PatientMedicationVo();
    form.getLocalContext().setRecord(voMed);

    form.ctnDetails().setCollapsed(false);

    form.ctnDetails().setcustomControlAuthorEnabled(true);
    setAuthoringInfo();

    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnDetails().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnDetails().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime());
}
项目:AvoinApotti    文件:Logic.java   
private MedicLiteVoCollection listConsultantsByName(String medicName) throws CodingRuntimeException
{
    // Leave throws so that consultants are not cleared when an invalid search is made
    if (medicName == null || medicName.trim().length() < 3)
        throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");


    // Build filtering VO
    MedicLiteVo filterVo = new MedicLiteVo();
    filterVo.setMos(new MemberOfStaffLiteVo());
    filterVo.getMos().setName(new PersonName());
    filterVo.getName().setSurname(medicName);
    filterVo.getName().setForename(medicName);

    // Retrieve the medics (list from domain)
    try
    {
        return domain.listConsultants(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void fillDocumentWorklistSearchCriteria() 
{
    DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo();

    criteria.setLocation(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue());
    criteria.setClinic(form.lyrLetterCreate().tabClinicList().qmbClinic().getValue());
    criteria.setAuthor(form.lyrLetterCreate().tabTemplate().ccAuth().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.lyrLetterCreate().tabTemplate().ccAuth().getValue() : null);
    criteria.setResponsible(form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() : null);
    criteria.setTypist(form.lyrLetterCreate().tabTemplate().ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.lyrLetterCreate().tabTemplate().ccTypist().getValue() : null);
    criteria.setSpecialty(form.lyrLetterCreate().tabTemplate().cmbSpecialty().getValue());
    //criteria.setDateFrom(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() != null ? form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() : form.lyrLetterCreate().tabClinicList().dteClinicDate().getValue());        WDEV-12721
    //criteria.setDateTo(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() != null ? form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() : form.lyrLetterCreate().tabClinicList().dteClinicDate().getValue());          WDEV-12721
    criteria.setDateFrom(form.getLocalContext().getMinDate());  //WDEV-12721
    criteria.setDateTo(form.getLocalContext().getMaxDate());    //WDEV-12721

    form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(criteria);
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnNewClick() throws PresentationLogicException
{
    clearScreen();
    form.customControlAuthoringInfo().initializeComponent();

    form.getLocalContext().setSelectedUrinalysis(null);
    form.chkNoSample().setValue(false);

    form.setcustomControlAuthoringInfoEnabled(true);
    Object mos = domain.getMosUser();
    if (mos != null)
    {
        form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo) mos, mos.toString());
        form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo) mos);
    }
    form.dtimRecordingDateTime().setValue(new DateTime());
    form.setMode(FormMode.EDIT);
}
项目:AvoinApotti    文件:Logic.java   
private void setRecordActive() 
{
    SupportNetworkFamily voFamily = form.getLocalContext().getSelectedRecord();

    voFamily.setInactivatingUser(null); //WDEV-12384
    voFamily.setInactivatingDateTime(null); //WDEV-12384

    if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.TRUE)) //if its true,goes to false (inactivate)
    {
        voFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);  //if its false already,goes to true (reactivate)

        Object mos = domain.getMosUser();
        if(mos instanceof MemberOfStaffShortVo)
        {
            voFamily.setInactivatingUser((MemberOfStaffLiteVo) mos);    //WDEV-12384
        }

        voFamily.setInactivatingDateTime(new DateTime());   //WDEV-12384
    }
    else if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.FALSE)) //if its true,goes to false (inactivate)
        voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);
    else if(voFamily.getIsCurrentlyActiveFamilySupport() == null)
        voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    form.getLocalContext().setSelectedRecord(voFamily); 
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onChkNoKnownAllergiesValueChanged() throws PresentationLogicException 
{
    if(form.ctnDetails().chkNoKnownAlerts().getValue())
    {
        clearCurScreen();
        form.ctnDetails().setCollapsed(false);
        enableDetailsControls(false);
        form.ctnDetails().customControlAuthoringInfo().initializeComponent();
        //WDEV-12901 
        Object mos = domain.getMosUser();
        if(mos != null){
            form.ctnDetails().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, ((MemberOfStaffLiteVo)mos).getIMosName());
            form.ctnDetails().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
        }
        form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime());
    }       
    else
    {
        enableDetailsControls(true);
    }

}
项目: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    文件:Logic.java   
private TrackingAttendanceStatusVo populateTrackingAttendanceToSave()
{
    TrackingAttendanceStatusVo trackingAttendance = new TrackingAttendanceStatusVo();

    trackingAttendance.setPatient(form.getGlobalContext().Core.getPatientShort());
    trackingAttendance.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
    trackingAttendance.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
    trackingAttendance.setTrackingArea(form.getLocalContext().getTrackingForReferral().getCurrentArea());
    trackingAttendance.setStatusDatetime(new DateTime());

    Object mos = domain.getMosUser();
    if (mos instanceof MemberOfStaffLiteVo)
    {
        trackingAttendance.setCreatedBy((MemberOfStaffLiteVo) mos);
    }

    trackingAttendance.setStatus(ims.emergency.vo.lookups.TrackingStatus.REFERRED_TO_OTHER_SPECIALITY);
    //WDEV-16777
    trackingAttendance.setPrevStatus((form.getLocalContext().getTrackingForReferral()!=null && form.getLocalContext().getTrackingForReferral().getCurrentStatus()!=null  ) ? form.getLocalContext().getTrackingForReferral().getCurrentStatus().getStatus() : null);

    return trackingAttendance;
}
项目:AvoinApotti    文件:Logic.java   
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
    TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

    EmergencyAttendanceForPendingArrivalsVo tempRecord = form.getLocalContext().getselectedRecord();

    trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
    trackingAttStatus.setEpisode(tempRecord.getEpisode().getEpisodeOfCare());
    trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
    trackingAttStatus.setTrackingArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

    trackingAttStatus.setStatusDatetime(new DateTime());

    Object mos = domain.getMosUser();
    if (mos instanceof MemberOfStaffLiteVo)
    {
        trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
    }

    trackingAttStatus.setStatus(status);
    trackingAttStatus.setPrevStatus(null); //WDEV-16777

    return trackingAttStatus;
}
项目:AvoinApotti    文件:Logic.java   
private SupportNetworkFamily setRecordActive() 
{
    SupportNetworkFamily voFamily = form.getLocalContext().getSelectedFamilyRecord();

    voFamily.setInactivatingUser(null); 
    voFamily.setInactivatingDateTime(null);

    if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.TRUE)) //if its true,goes to false (inactivate)
    {
        voFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);  //if its false already,goes to true (reactivate)

        Object mos = domain.getMosUser();
        if(mos instanceof MemberOfStaffShortVo)
        {
            voFamily.setInactivatingUser((MemberOfStaffLiteVo) mos);
        }

        voFamily.setInactivatingDateTime(new DateTime());   
    }
    else if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.FALSE)) //if its true,goes to false (inactivate)
        voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);
    else if(voFamily.getIsCurrentlyActiveFamilySupport() == null)
        voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    return voFamily;
}
项目:AvoinApotti    文件:Logic.java   
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
    TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

    trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
    trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
    trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
    trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

    trackingAttStatus.setStatusDatetime(new DateTime());

    Object mos = domain.getMosUser();
    if (mos instanceof MemberOfStaffLiteVo)
    {
        trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
    }

    trackingAttStatus.setStatus(status);
    trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);

    return trackingAttStatus;
}
项目:AvoinApotti    文件:Logic.java   
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
    TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

    trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
    trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
    trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
    trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

    trackingAttStatus.setStatusDatetime(new DateTime());

    Object mos = domain.getMosUser();
    if (mos instanceof MemberOfStaffLiteVo)
    {
        trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
    }

    trackingAttStatus.setStatus(status);
    //WDEV-16777
    trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);

    return trackingAttStatus;
}
项目: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    文件:Logic.java   
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
    TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

    trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
    trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
    trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
    trackingAttStatus.setTrackingArea(form.getLocalContext().getTrackingForReferral().getCurrentArea());

    trackingAttStatus.setStatusDatetime(new DateTime());

    Object mos = domain.getMosUser();
    if (mos instanceof MemberOfStaffLiteVo)
    {
        trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
    }

    trackingAttStatus.setStatus(status);
    trackingAttStatus.setPrevStatus((form.getLocalContext().getTrackingForReferral()!=null && form.getLocalContext().getTrackingForReferral().getCurrentStatus()!=null  ) ? form.getLocalContext().getTrackingForReferral().getCurrentStatus().getStatus() : null);

    return trackingAttStatus;
}
项目:AvoinApotti    文件:Logic.java   
private void doRemoveStageFromScope()
{
    try
    {
        MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;
        domain.removeStageFromScope(form.getLocalContext().getICP(), (PatientICPStageRefVo) form.dyngrdICP().getValue(), mos);

        refresh();
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        e.printStackTrace();
        refresh();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void doRemovePhaseFromScope()
{
    try
    {
        MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;
        domain.removePhaseFromScope(form.getLocalContext().getICP(), (PatientICPPhaseRefVo) form.dyngrdICP().getValue(), mos);

        refresh();
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        e.printStackTrace();
        refresh();
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to set an action to MET status
 */
private void doActionMet()
{
    try
    {
        MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;

        // Set action status to Action MET
        domain.setActionStatus(form.getGlobalContext().ICP.getPatientICPRecord(), (PatientICPActionRefVo) form.dyngrdICP().getValue(), ICPActionStatus.MET, engine.hasRight(AppRight.CAN_COUNTERSIGN), mos);

        // Refresh screen
        refresh();
    }
    catch (StaleObjectException exception)
    {
        // Display SOE message
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        // Refresh screen
        refresh();
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to set an action to NOT MET status
 */
private void doActionNotMet()
{
    try
    {
        MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;

        // Set action status to Action NOT MET
        PatientICPAction_PresentationVo icpAction = domain.setActionStatus(form.getGlobalContext().ICP.getPatientICPRecord(), (PatientICPActionRefVo) form.dyngrdICP().getValue(), ICPActionStatus.NOT_MET, engine.hasRight(AppRight.CAN_COUNTERSIGN), mos);

        // Display dialog for recording action variance
        form.getGlobalContext().ICP.setActionStatus(icpAction.getCurrentStatus());
        engine.open(form.getForms().ICP.RecordICPActionVariance);
    }
    catch (StaleObjectException exception)
    {
        // Display SOE message
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        // Refresh screen
        refresh();
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onChkNoKnownAllergiesValueChanged() throws PresentationLogicException 
{
    if(form.ctnDetails().chkNoKnownAllergies().getValue())
    {
        clearDetailsPanel();
        form.ctnDetails().setCollapsed(false);
        form.ctnDetails().setcustomControlCodingItemEnabled(false);
        form.ctnDetails().setcustomControlAuthoringInfoEnabled(true);
        enableAllergyDetailControls(false);
        form.ctnDetails().customControlAuthoringInfo().initializeComponent();
        //WDEV-12901 
        Object mos = domain.getMosUser();
        if(mos != null)
            form.ctnDetails().txtRcordingHCP().setValue(((MemberOfStaffLiteVo)mos).getIMosName());
        form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime());
    }       
    else
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(true);
        form.ctnDetails().setcustomControlAuthoringInfoEnabled(true);
        enableAllergyDetailControls(true);
    }

}
项目:AvoinApotti    文件:PatientICPPresentationComponentImpl.java   
private PatientICPStage_StatusChangeVo prepareStageToRemoveFromScope(PatientICPStage_StatusChangeVo stage, MemberOfStaffLiteVo mos)
{
    // Create stage status
    PatientICPStageStatusVo stageStatus = new PatientICPStageStatusVo();
    // Populate values to status
    stageStatus.setStatusDate(new DateTime());
    stageStatus.setChangedBy(mos.getIMosName());
    stageStatus.setStatus(ICPStageStatus.NOTINSCOPE);

    // Set status to stage
    stage.setCurrentStatus(stageStatus);
    stage.getStatusHistory().add(stageStatus);

    // Iterate stage phases
    for (PatientICPPhase_StatusChangeVo phase : stage.getStagePhases())
    {
        // If phase is in SCOPE then remove it
        if (ICPPhaseStatus.INPROGRESS.equals(phase.getCurrentStatus().getStatus()))
        {
            phase = preparePhaseToRemoveFromScope(phase, mos);
        }
    }

    return stage;
}
项目:AvoinApotti    文件:PatientICPPresentationComponentImpl.java   
private PatientICPPhase_StatusChangeVo preparePhaseToRemoveFromScope(PatientICPPhase_StatusChangeVo phase, MemberOfStaffLiteVo mos)
{
    // Create a new phase status
    PatientICPPhaseStatusVo phaseStatus = new PatientICPPhaseStatusVo();
    // Populate values to status
    phaseStatus.setStatusDate(new DateTime());
    phaseStatus.setChangedBy(mos.getIMosName());
    phaseStatus.setStatus(ICPPhaseStatus.NOTINSCOPE);

    // Set status to phase
    phase.setCurrentStatus(phaseStatus);
    phase.getStatusHistory().add(phaseStatus);

    // Iterate phase actions
    for (PatientICPAction_StatusChangeVo action : phase.getPhaseActions())
    {
        action = prepareActionToRemoveFromScope(action, mos);
    }

    return phase;
}
项目:AvoinApotti    文件:PatientICPPresentationComponentImpl.java   
private PatientICPAction_StatusChangeVo prepareActionToRemoveFromScope(PatientICPAction_StatusChangeVo action, MemberOfStaffLiteVo mos)
{
    // If the action is in SCOPE then remove it from scope
    if (ICPActionStatus.OUTSTANDING.equals(action.getCurrentStatus().getStatus()))
    {
        // Create a new action status
        PatientICPActionStatusVo actionStatus = new PatientICPActionStatusVo();
        // Populate values to status
        actionStatus.setStatusDate(new DateTime());
        actionStatus.setChangedBy(mos);
        actionStatus.setStatus(ICPActionStatus.NOTINSCOPE);

        // Set status to action
        action.setCurrentStatus(actionStatus);
        action.getStatusHistory().add(actionStatus);
    }

    return action;
}
项目: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    文件:Logic.java   
public void newInstance() throws ims.framework.exceptions.PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    clearInstanceControls();
    form.getLocalContext().setSelectedRecord(null); //WDEV-15485
    form.grdCalls().setValue(null);

    form.cmbService().setValue((form.getLocalContext().getCatsReferral() != null && form.getLocalContext().getCatsReferral().getReferralDetails() != null ) ? form.getLocalContext().getCatsReferral().getReferralDetails().getService() : null);//WDEV-18013
    MemberOfStaffLiteVo voMos = (MemberOfStaffLiteVo) domain.getMosUser();
    if (voMos != null)
    {
        form.cmbCaller().newRow(voMos, voMos.getName().toString());
        form.cmbCaller().setValue(voMos);
    }
    form.dtimDateTime().setValue(new DateTime());
}
项目:AvoinApotti    文件:Logic.java   
private CatsReportNoteVo populateDataFromScreen(CatsReportNoteVo note) 
{
    if(note == null)
        note = new CatsReportNoteVo();

    note.setID_CatsReportNote(null);
    note.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral());
    note.setAuthoringInformation(form.ccAuthoring().getValue());

    AuthoringInformationVo authoring = new AuthoringInformationVo();
    authoring.setAuthoringDateTime(new DateTime());
    HcpLiteVo hcpVo = new HcpLiteVo();
    hcpVo.setID_Hcp(engine.getLoggedInUser().getHcpId());
    hcpVo.setMos(domain.getMosUser() != null ? (MemberOfStaffLiteVo) domain.getMosUser() : null);
    authoring.setAuthoringHcp(hcpVo);
    note.setRecordingInformation(authoring);

    note.setFinalNote(form.richTextCatsReport().getValue());

    return note;
}
项目:AvoinApotti    文件:Logic.java   
private void addReferralStatusHistoryRow(CatsReferralStatusVo catsReferralStatusVo) 
{
    if(catsReferralStatusVo == null)
        return;

    grdStatusHistoryRow row = form.grdStatusHistory().getRows().newRow();

    row.setColDate(catsReferralStatusVo.getStatusDateTimeIsNotNull() ? catsReferralStatusVo.getStatusDateTime().toString() : "");
    if(catsReferralStatusVo.getAuthoringUserIsNotNull() && catsReferralStatusVo.getAuthoringUser().getID_MemberOfStaffIsNotNull())
    {
        try 
        {
            MemberOfStaffLiteVo authoringUser = domain.getMemberOfStaff(catsReferralStatusVo.getAuthoringUser());
            row.setColUser(authoringUser != null && authoringUser.getNameIsNotNull() ? authoringUser.getName().toString() : "");
        } 
        catch (DomainInterfaceException e) 
        {
            e.printStackTrace();
        }
    }
    row.setColStatus(catsReferralStatusVo.getReferralStatusIsNotNull() ? catsReferralStatusVo.getReferralStatus().getIItemText() : "");
}
项目:AvoinApotti    文件:Logic.java   
private void populateForm()
{
    MemberOfStaffLiteVo tempVo = new MemberOfStaffLiteVo();
    PersonName temppers = new PersonName();
    temppers.setForename("Med");
    temppers.setSurname("Med");
    temppers.setUpperForename("Med");
    temppers.setUpperSurname("Med");
    tempVo.setName(temppers);

    form.txtExpectedDateOfDischarge().setValue("20/10/2010");
    form.ccDischargingClin().setValue(tempVo);
    form.cmbDischSPecDEp().newRow("Departament","Departament");
    form.cmbDischMethod().newRow("Method","Method");
    form.cmbDischFrom().newRow("Discharged From","Discharged From");
    form.cmbDischDestination().newRow("Destination", "Destination");
    form.ansCertificateofSickness().setValue(YesNo.YES);
    form.ansConfirmationOfHardcopy().setValue(YesNo.NO);
    form.ansLivingAlone().setValue(YesNo.YES);
    form.ansFitToReturnWork().setValue(YesNo.NO);
    form.cmbReturnToWorkAdvice().newRow("Advice1","Advice1");
    form.dtimActualDateTimeOfMedDisch().setValue(new DateTime());
    form.txtDischGrade().setValue("Medic");
}
项目:AvoinApotti    文件:Logic.java   
private NursingNotesVo populateDataFromScreen(NursingNotesVo record)
{
    if (record == null)
    {
        record = new NursingNotesVo();
        record.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral());
    }
    calculateBMI();
    record.setAuthoringUser(form.ccAuthUser().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo)form.ccAuthUser().getValue():null);
    record.setAuthoringDateTime(form.dtimAuthoringDT().getValue());
    record.setVitalSigns(getVitalSigns(record.getVitalSigns()));
    record.setSmokingStatus(form.cmbSmokStatus().getValue());
    record.setAdviceGiven(form.chkAdviceGiven().getValue());
    record.setReferredToSomkingCessation(form.chkReffered().getValue());
    record.setUnitsOfAlcoholConsumedPerWeek(form.intAlcohol().getValue()!=null?form.intAlcohol().getValue().floatValue():null);
    record.setMRSAResult(form.chkNeg().getValue()?MRSAResult.NEGATIVE:(form.chkPos().getValue()?MRSAResult.POSITIVE:null));
    record.setObservationNotes(form.txtObsNotes().getValue());
    record.setAllergies(getAllergiesFromGrid());
    record.setComorbidities(getComorbidities());
    record.setCurrentMedications(getCurrentMedication());

    return record;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{   
    form.cc1().initialize(MosType.ALL);//   WDEV-13691
    form.cc1().isRequired(true);//  WDEV-13691
    form.cc1().setValue(domain.getMosUser() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) domain.getMosUser() : null);//   WDEV-13691
    form.dtim1().setValue(new DateTime());
}
项目:AvoinApotti    文件:Logic.java   
private void populateQmbConsultants()
{
    MedicLiteVo voMedic = new MedicLiteVo();
    MemberOfStaffLiteVo mosLiteVo = (MemberOfStaffLiteVo) domain.getMosUser();
    if (mosLiteVo != null)
    {
        voMedic.setMos(mosLiteVo);
        form.qmbConsultant().newRow(voMedic, voMedic.getName().toString());
        form.qmbConsultant().setValue(voMedic);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen(Object[] args) throws PresentationLogicException {
    form.customControlAuthoringInfo().initializeComponent();
    form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true);//WDEV-13559
    Object mos = domain.getMosUser();
    if(mos != null)
    {
        form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.dtimRecordingDateTime().setValue(new DateTime());
    form.lblOriginOfScore().setValue(form.getGlobalContext().Core.getVitalSignsEscalationText());
    form.txtScore().setValue(form.getGlobalContext().Core.getVitalSignsEscalationScore());
}
项目:AvoinApotti    文件:Logic.java   
private void fillDocumentWorklistSearchCriteria() 
{
    DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo();

    criteria.setAuthor(form.ccAuthoring().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccAuthoring().getValue() : null);
    criteria.setResponsible(form.ccResponsibleHcp().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccResponsibleHcp().getValue() : null);
    criteria.setTypist(form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null);
    criteria.setSpecialty(form.cmbSpecialty().getValue());
    criteria.setDateFrom(form.dteDocumentDate().getValue());
    criteria.setDateTo(form.dteDocumentDate().getValue());

    form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(criteria);
}
项目:AvoinApotti    文件:Logic.java   
private void updateMenuState()
{
    form.getContextMenus().Core.hideAllRCHTCustomListMenuMenuItems();
    form.getContextMenus().Core.getRCHTCustomListMenuSELECTItem().setVisible(form.grdDetails().getValue() != null);
    form.getContextMenus().Core.getRCHTCustomListMenuSELECTItem().setEnabled(form.grdDetails().getValue() != null);
    form.getContextMenus().Core.getRCHTCustomListMenuREMOVEItem().setVisible(form.grdDetails().getValue() != null && form.cmbCustomLists().getValue() != null && form.cmbCustomLists().getValue().getListOwnerIsNotNull() && form.cmbCustomLists().getValue().getListOwner().equals((MemberOfStaffLiteVo)domain.getMosUser()));
    form.getContextMenus().Core.getRCHTCustomListMenuREMOVEItem().setEnabled(form.grdDetails().getValue() != null && form.cmbCustomLists().getValue() != null && form.cmbCustomLists().getValue().getListOwnerIsNotNull() && form.cmbCustomLists().getValue().getListOwner().equals((MemberOfStaffLiteVo)domain.getMosUser()));
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    form.ccAuthoringInfo().initializeComponent();
    form.ccRecordingHcp().initialize(MosType.HCP);

    Object mos = domain.getMosUser();
    if (mos != null && mos instanceof MemberOfStaffLiteVo)
    {
        form.ccRecordingHcp().setValue((MemberOfStaffLiteVo) mos);
    }
    form.dtimRecordingDateTime().setValue(new DateTime());
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    clearScreen();

    SocialHistoryVo socialHistory = domain.getSocialHistoryByPatient(form.getGlobalContext().Core.getPatientShort());
    populateScreenFromData(deleteIdForChildren(socialHistory == null ? null:(SocialHistoryVo)socialHistory.clone()),false);
    if(engine.getFormName().equals(form.getForms().Core.SocialHistory))
    {
        ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
        if(voClinicalContact != null)
        {
            AuthoringInformationVo voAuth = new AuthoringInformationVo();
            voAuth.setAuthoringDateTime(voClinicalContact.getStartDateTime());
            voAuth.setAuthoringHcp(voClinicalContact.getSeenBy());
            form.customControlAuth().setValue(voAuth);

            //WDEV-12901 
            Object mos = domain.getMosUser();
            if(mos != null){
                form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
                form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
            }
            form.dtimRecordingDateTime().setValue(new DateTime());
        }
        else
            setDefaultValues();//wdev-1930
    }
    else
    {
        setDefaultValues();
    }

    form.getLocalContext().setvoSocialHistory(null);
    form.setMode(FormMode.EDIT);
    form.customControlAuth().setIsRequiredPropertyToControls(true);
    updateControlsState();
    updateContextMenus();
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    form.ccAuthoringInfo().initializeComponent();
    form.ccRecordingHCP().initialize(MosType.HCP);

    Object mos = domain.getMosUser();
    if(mos != null && mos instanceof MemberOfStaffLiteVo)
    {
        form.ccRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.dtimRecordingDateTime().setValue(new DateTime());

}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnTaskCompleteClick() throws ims.framework.exceptions.PresentationLogicException
{
    Object mos = domain.getMosUser();
    if (mos instanceof MemberOfStaffLiteVo)
    {
        form.ccCompleted().setValue((MemberOfStaffLiteVo)mos);
    }
    form.dtimCompleted().setValue(new DateTime());

    if (save(PatientClericalTaskStatus.COMPLETED))
    {
        open();
    }
}
项目:AvoinApotti    文件:Logic.java   
private SurgicalAuditOperationDetailStatusVo populateStatus(SurgicalAuditOperationDetailStatus status, DateTime dateTime, MemberOfStaffLiteVo statusAuthoringUser)
{
    SurgicalAuditOperationDetailStatusVo statusRecord = new SurgicalAuditOperationDetailStatusVo();

    statusRecord.setOperationStatus(status);
    statusRecord.setStatusDateTime(dateTime);
    statusRecord.setAuthoringUser(statusAuthoringUser);

    return statusRecord;
}
项目:AvoinApotti    文件:Logic.java   
private AppointmentCallAttemptsVoCollection populateDataFromScreen() 
{
    AppointmentCallAttemptsVo voCall = form.getLocalContext().getSelectedRecord();
    if (voCall == null)
        voCall = new AppointmentCallAttemptsVo();

    voCall.setAppointmentService(form.cmbService().getValue());
    voCall.setCallDateTime(form.dtimDateTime().getValue());
    voCall.setCaller((MemberOfStaffLiteVo) domain.getMosUser());
    voCall.setCallerComments(form.txtComments().getValue());
    voCall.setReason(form.cmbReason().getValue());

    String[] arrErrors =  voCall.validate();    
    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return null;
    }

    if (form.grdCalls().getValue() != null)
        form.grdCalls().getSelectedRow().setValue(voCall);
    else
        addGridRow(voCall);

    AppointmentCallAttemptsVoCollection voColl = new AppointmentCallAttemptsVoCollection();

    for ( int  i = 0 ; i < form.grdCalls().getRows().size() ; i ++)
        voColl.add(form.grdCalls().getRows().get(i).getValue());

    return voColl;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.txtNotes().getValue() == null)
    {
        engine.showMessage("Note is mandatory", "Error", MessageButtons.OK, MessageIcon.WARNING);
        return;
    }

    ReferralNoteVo voNote = new ReferralNoteVo();
    if (form.getGlobalContext().RefMan.getReferralNoteIsNotNull())
    {
        voNote = form.getGlobalContext().RefMan.getReferralNote();
        voNote.setNote(form.txtNotes().getValue());
    }
    else
    {
        MemberOfStaffLiteVo voMos = (MemberOfStaffLiteVo) domain.getMosUser();
        if (voMos != null)
            voNote.setRecordingUser(voMos);
        voNote.setRecordingDateTime(new DateTime());

        voNote.setNote(form.txtNotes().getValue());
        voNote.setNoteType(ReferralNoteType.NON_CLINICAL);
    }
    form.getGlobalContext().RefMan.setReferralNote(voNote);

    engine.close(DialogResult.OK);
}