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

项目:AvoinApotti    文件:Logic.java   
private RACPCReferralVo populateDataFromScreen()
{       
    RACPCReferralVo voReferral = form.getLocalContext().getCurrentRecord();

    voReferral.setDateReferralMade(form.dteReferralMade().getValue());
    voReferral.setDateReferralReceived(form.dteReferralReceived().getValue());
    voReferral.setWaitingTime(form.intWaitingTime().getValue());
    voReferral.setReferralReason(form.cmbReason().getValue());
    voReferral.setDelayReason(form.cmbReasonDelayed().getValue());
    voReferral.setCardiologist((Hcp)form.ccCardiologist().getValue());
    voReferral.setClinicDoctor((Hcp)form.ccClinicDoctor().getValue());
    voReferral.setAppointmentDate(form.dteAppointment().getValue());
    voReferral.setSourceofReferral(form.cmbReferralSource().getValue());

    return voReferral;  
}
项目:AvoinApotti    文件:Logic.java   
private Hcp getCurrentHcp()
{
    /*if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
    {
        if(form.getGlobalContext().Core.getCurrentClinicalContact().getSeenByIsNotNull())
            return form.getGlobalContext().Core.getCurrentClinicalContact().getSeenBy();
    }
    else
    {
        if(domain.getHcpUser() != null)
            return domain.getHcpUser() instanceof Hcp?(Hcp)domain.getHcpUser():null;
    }*/
    if(domain.getHcpUser() != null)
        return domain.getHcpUser() instanceof Hcp?(Hcp)domain.getHcpUser():null;

    return null;
}
项目:AvoinApotti    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    //check the logged on user, Only a HCP from the Team that created the problem can resolve a problem
    if(form.cmbStatus().getValue() != null && form.cmbStatus().getValue().equals(PatientConcernStatus.RESOLVED))
    {
        Hcp voHcp = (Hcp) domain.getHcpUser();
        HcpDisType identifiedByTeamType = form.cmbIdByTeam().getValue();
        if(identifiedByTeamType != null)
        {           
            if(voHcp != null && (!voHcp.getHcpType().equals(identifiedByTeamType)))
            {
                form.cmbStatus().setValue(null);
                engine.showMessage("You are not a member of the team that created the concern and therefore cannot resolve it");
                return;
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void setAuthoringCP(String value)
{
    form.qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            Hcp med = coll.get(i);
            form.qmbAuthoringCP().newRow(med, med.toString());          
        }

        if (coll.size() == 1)
            form.qmbAuthoringCP().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.qmbAuthoringCP().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateAdviceLeafletsDetails(AdviceLeafletsVo vo) 
{
    if(vo != null)
    {
        //form.getLocalContext().setVoAdviceLeaflets(vo);    WDEV-7044

        Hcp authoringHCP = vo.getAuthoringHCP();
        if (authoringHCP != null)
        {
            form.qmbRecordingHCP().newRow(authoringHCP, authoringHCP.toString());
            form.qmbRecordingHCP().setValue(authoringHCP);
        }
        form.cmbLeaflet().setValue(vo.getAdviceLeaflet());
        form.txtVersionNo().setValue(vo.getLeafletVersion());
        form.dteGiven().setValue(vo.getDateGiven());
        if (vo.getAuthoringDateTime() != null)
        {
            form.dteRecorded().setValue(vo.getAuthoringDateTime().getDate());
            form.tmeRecorded().setValue(vo.getAuthoringDateTime().getTime());
        }
        form.cmbGivenTo().setValue(vo.getGivenTo());
        form.txtGivenToName().setValue(vo.getGivenToName());
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkLoggedOnUser()
{
    if (form.qmbConfirmedBy().getVisible())
    {
        if (form.qmbConfirmedBy().getValue() == null)
        {
            Hcp voHcp = (Hcp) domain.getHcpUser();
            if (voHcp != null)
            {
                if (HcpDisType.NURSING.equals(voHcp.getHcpType()))
                {
                    NurseVo voNurse = (NurseVo) voHcp;
                    //wdev-4938
                    if (voNurse != null && voNurse.getNurseTypeIsNotNull() && voNurse.getNurseType().equals(HcpDisType.STUDENTNURSE))
                    {
                        engine.showMessage("'Confirmed by' is a mandatory field as you are logged in as a student nurse");
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.PresentationLogicException
{
    //Defaulting Authoring HCP and Date
    form.dteDate().setValue(new Date());

    form.cmbDiscontinuedByType().setValue(MedciationCommencedDiscontinuedType.MOS);
    defaultHCP();
    form.qmbHCP().setEnabled(true);

    if (form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValuesIsNotNull())
    {
        form.dteDate().setValue(form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedDate());
        Hcp hcp = form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedHCP();
        if(hcp!=null){
            form.qmbHCP().newRow(hcp, hcp.toString());
            form.qmbHCP().setValue(hcp);
        }
        form.cmbReasonDiscontinued().setValue(form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedReason());
        form.txtReasonDesc().setValue(form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedReasonDesc());
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    form.setMode(FormMode.EDIT);
    form.dtimRecording().setEnabled(true);
    form.qmbHCP().setEnabled(true);
    form.dtimRecording().setValue(new DateTime());
    form.dteAssess().setValue(new Date());
    form.dteReferral().setValue(new Date());

    Hcp hcp = (Hcp)domain.getHcpUser();
    if (hcp != null)
    {
        form.qmbHCP().newRow(hcp,hcp.toString());
        form.qmbHCP().setValue(hcp);
    }
}
项目: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 MemberOfStaffShortVo populateFilterFromScreen()
{
    MemberOfStaffShortVo voMosFilter = new MemberOfStaffShortVo();
    PersonName name = new PersonName();
    name.setSurname(form.txtSurName().getValue());
    voMosFilter.setName(name);
    voMosFilter.setStaffType(form.cmbStaffType().getValue());
    if (form.cmbHcpDiscipline().getValue() != null)
    {
        Hcp voHcp = new Hcp();
        voHcp.setHcpType(form.cmbHcpDiscipline().getValue());
        voMosFilter.setHcp(voHcp);
    }
    voMosFilter.setIsActive(new Boolean(form.chkActiveOnly().getValue()));

    return voMosFilter;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to prepare the screen for adding a new MDT Note record
 */
private void newMDTNoteInstance()
{
    // Clear MDT Note controls
    clearNoteInstanceControls();
    form.grdNotesSummary().setValue(null);

    // Clear local context for selected MDT Note
    form.getLocalContext().setCurrentMDTNote(null);

    // Set default values
    Hcp hcp = (Hcp) domain.getHcpUser();
    if(hcp != null)
    {
        form.ctnDetails().qmbRecHCP().newRow(hcp, hcp.toString());
        form.ctnDetails().qmbRecHCP().setValue(hcp);
    }

    form.ctnDetails().dtimRecDateTime().setValue(new DateTime());

    // Set form to mode of editing MDT Note
    // Set local context for mode editing MDT Note
    form.getLocalContext().setEditMDTNoteMode(Boolean.TRUE);
    form.getLocalContext().setNewNote(Boolean.TRUE);
}
项目:AvoinApotti    文件:Logic.java   
private void populateDataFromScreenVoSpecific(Hcp value)
{
    if (value instanceof NurseVo)
    {
        populateDataFromScreenVoSpecific((NurseVo)value);
    }
    else if (value instanceof MedicVo)
    {
        populateDataFromScreenVoSpecific((MedicVo)value);
    }
    else if (value instanceof TherapistVo)
    {
        populateDataFromScreenVoSpecific((TherapistVo)value);
    }
    else 
    {   
        value.setHcpType(form.lyrDetails().tabHcp().cmbHcpType().getValue()!=null?form.lyrDetails().tabHcp().cmbHcpType().getValue():HcpDisType.OTHER);

        // WDEV-13888
        value.setIsHCPaResponsibleHCP(form.lyrDetails().tabHcp().chkIsOtherDisciplineResponsibleHCP().getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
private MedicationDose getDoseRowValue(DynamicGridRow row)
{
    if (row == null)
        throw new CodingRuntimeException("Major Logical Error - Can not read a value from null row");

    if (row.getValue() == null || !(row.getValue() instanceof MedicationDose))
    {
        row.setValue(new MedicationDose());
    }

    MedicationDose dose = (MedicationDose) row.getValue();

    DynamicGridCell cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSENAME));
    dose.setDose(cell.getValue() != null ? cell.getValue().toString() : null);

    cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE));
    dose.setAdminRoute(cell.getValue() != null ? (MedicationRoute) (cell.getValue()) : null);

    cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY));
    dose.setDoseStartHcp(cell.getIdentifier()!= null ? (Hcp) (cell.getIdentifier()) : null);

    cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE));
    dose.setDoseStartDate(cell.getValue() != null ? (Date) (cell.getValue()) : null);

    return dose;
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.ctnEducateToCarers().qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname("%" + value + "%");
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            Hcp med = coll.get(i);
            form.ctnEducateToCarers().qmbAuthoringCP().newRow(med, med.toString());         
        }
        if (coll.size() == 1)
        {
            form.ctnEducateToCarers().qmbAuthoringCP().setValue(coll.get(0));
        }
        else if (coll.size() > 1)
        {
            form.ctnEducateToCarers().qmbAuthoringCP().showOpened();        
        }       
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHcps(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().newRow(med, med.toString());            
    }
    if (coll.size() == 1)
    {
        form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().showOpened();       
    }       
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.qmbAuthoringCP().newRow(med, med.toString());          
    }
    if (coll.size() == 1)
    {
        form.qmbAuthoringCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbAuthoringCP().showOpened();     
    }       
}
项目:AvoinApotti    文件:Logic.java   
private void setDefaultValues()
{
    if(ConfigFlag.UI.RESTRICT_TAXONOMY_ACCESS.getValue())
    {
        form.ctnDetails().customControlCodingItem().setCodingItemType(CodingItemType.ALLERGY);
        form.ctnDetails().customControlCodingItem().setHotlist(new Boolean(false));
        form.ctnDetails().customControlCodingItem().setParentEditing(true);
        form.ctnDetails().customControlCodingItem().search("%");
        form.ctnDetails().customControlCodingItem().clear();


    }
    Hcp voHcp = (Hcp) domain.getHcpUser();
    if (voHcp != null)
    {
        form.ctnDetails().customControlAuthoringInfo().initializeComponent();
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringHCPTextSubmited(String value) throws PresentationLogicException {
    form.ctnDetails().qmbAuthoringHCP().clear();
    Hcp filter = new Hcp();
    PersonName name = new PersonName();
    name.setSurname("%" + value + "%");
    filter.setQueryName(name);
    //filter.setHcpType(HcpDisType.MEDICAL);

    HcpCollection voHCPColl = domain.listHcps(filter);

    if(voHCPColl != null)
    {
        for (int i = 0; i < voHCPColl.size(); i++)
        {
            form.ctnDetails().qmbAuthoringHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString());
        }
        if (voHCPColl.size() == 1)
        {
            form.ctnDetails().qmbAuthoringHCP().setValue(voHCPColl.get(0));
        }
        else if (voHCPColl.size() > 1)
        {
            form.ctnDetails().qmbAuthoringHCP().showOpened();       
        }
    }       
}
项目:AvoinApotti    文件:Logic.java   
private void editData() 
{
    form.setMode(FormMode.EDIT);


    if (form.getLocalContext().getSelectedRecordIsNotNull()
        && form.getLocalContext().getSelectedRecord().getID_ReadyToLeave() == null)
    {
        Hcp hcpVo = (Hcp)domain.getHcpUser();
        if (hcpVo != null
            && hcpVo.getHcpTypeIsNotNull()
            && hcpVo.getHcpType().equals(HcpDisType.NURSING))
            form.ccDischNurseorMidwife().setValue(hcpVo);

        form.dtimDischMidf().setValue(new DateTime());
    }

    form.getGlobalContext().Clinical.seteDischargeDisableTabs(true);
    form.getLocalContext().setLastEvent(null);
    form.fireCustomControlValueChanged();
}
项目:AvoinApotti    文件:Logic.java   
private void setAuthoringCP(String value)
{
    form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listMedics(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().newRow(med, med.toString());           
    }
    if (coll.size() == 1)
        form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
    else if (coll.size() > 1)
        form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().showOpened();  

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbRefferalToTextSubmited(String value) throws PresentationLogicException
{
    form.ctnDetails().qmbRefferalTo().clear();

    form.ctnDetails().cmbLocation().clear();            //wdev-16565
    HcpCollection coll = domain.listHcps(value);
    //WDEV-2105 - check for null. It shouldn't crash ???
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            Hcp med = coll.get(i);
            form.ctnDetails().qmbRefferalTo().newRow(med.getMos(), med.toString());         
        }
        if (coll.size() == 1)
        {
            form.ctnDetails().qmbRefferalTo().setValue(coll.get(0).getMos());
            onQmbRefferalToValueChanged();
        }
        else if (coll.size() > 1)
        {
            form.ctnDetails().qmbRefferalTo().showOpened();     
        }       
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.qmbAuthoringHCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.qmbAuthoringHCP().newRow(med, med.toString());
    }
    if (coll.size() == 1)
        form.qmbAuthoringHCP().setValue(coll.get(0));
    else if (coll.size() > 1)
        form.qmbAuthoringHCP().showOpened();

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException
{
    form.qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listMedics(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.qmbAuthoringCP().newRow(med, med.toString());          
    }
    if (coll.size() == 1)
    {
        form.qmbAuthoringCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbAuthoringCP().showOpened();     
    }       

}
项目:AvoinApotti    文件:Logic.java   
private void setAuthoringCP(String value)
{
    form.qmbHCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listMedics(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.qmbHCP().newRow(med, med.toString());          
    }

    if (coll.size() == 1)
        form.qmbHCP().setValue(coll.get(0));
    else if (coll.size() > 1)
        form.qmbHCP().showOpened();

}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHcps(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().newRow(med, med.toString());           
    }
    if (coll.size() == 1)
    {
        form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().showOpened();      
    }       
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException
{
    form.ctnDetails().qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.ctnDetails().qmbAuthoringCP().newRow(med, med.toString());         
    }
    if (coll.size() == 1)
    {
        form.ctnDetails().qmbAuthoringCP().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.ctnDetails().qmbAuthoringCP().showOpened();        
    }           
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringCPWardTextSubmited(String value) 
{
    form.qmbAuthoringCPWard().clear();
    HcpCollection voHcpColl = setAuthoringCP(value);    

    for (int i = 0; i < voHcpColl.size(); i++)
    {
        Hcp med = voHcpColl.get(i);
        form.qmbAuthoringCPWard().newRow(med, med.toString());          
    }

    if (voHcpColl.size() == 1)
        form.qmbAuthoringCPWard().setValue(voHcpColl.get(0));
    else if (voHcpColl.size() > 1)
        form.qmbAuthoringCPWard().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbAuthoringTextSubmited(String value) throws PresentationLogicException
{
    form.qmbAuthoring().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.qmbAuthoring().newRow(med, med.toString());            
    }

    if (coll.size() == 1)
        form.qmbAuthoring().setValue(coll.get(0));
    else if (coll.size() > 1)
        form.qmbAuthoring().showOpened();   

}
项目:AvoinApotti    文件:Logic.java   
private void loadTherapistPresentCombo() 
{
    form.cmbTherapistPresent().clear();
    Hcp filter = new Hcp();
    filter.setHcpType(HcpDisType.THERAPY);

    HcpCollection collVoHcp = domain.listHcps(filter);

    if(collVoHcp != null)
    {
        for (int i = 0; i < collVoHcp.size(); i++)
        {
            form.cmbTherapistPresent().newRow(collVoHcp.get(i), collVoHcp.get(i).getName().toString());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setAuthoringCP(String value)
{
    form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().newRow(med, med.toString());         
    }

    if (coll.size() == 1)
        form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().setValue(coll.get(0));
    else if (coll.size() > 1)
        form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
private void setAuthoringCP(String value)
{
    form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().clear();
    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listHCPs(filter);
    if(coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            Hcp med = coll.get(i);
            form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().newRow(med, med.toString());            
        }

        if (coll.size() == 1)
            form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
        else if (coll.size() > 1)
            form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void newInstance()
{
    if(isRACPCComplete())// WDEV-13662
        return;

    // populate Cardiologist and Clinic Doctor
    Object objectHcpUser = domain.getHcpUser();

    if (objectHcpUser instanceof Hcp)
    {
        Hcp hcpUser = (Hcp) objectHcpUser;

        if(HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
        {
            form.ccClinicDoctor().setValue(hcpUser);
            form.ccCardiologist().setValue(hcpUser);
        }
    }

    CareContextForRACPCReferralVo objRACPCReferralCareContext = domain.getCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (objRACPCReferralCareContext != null)
        if (objRACPCReferralCareContext.getPasEvent() != null)
            populateFromPASEvent(objRACPCReferralCareContext.getPasEvent());

    form.getLocalContext().setCurrentRecord(null);
    form.setMode(FormMode.EDIT);
}
项目:AvoinApotti    文件:Logic.java   
private void loadHcps()
{
    form.qmbAuthoringCP().clear();

    Hcp voHcp = (Hcp) domain.getHcpUser();
    if(voHcp != null)
    {
        form.qmbAuthoringCP().newRow(voHcp, voHcp.toString());
        form.qmbAuthoringCP().setValue(voHcp);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setDefaultValues()
{
    Hcp hcpUser = (Hcp)domain.getHcpUser();
    if(hcpUser != null)
    {
        form.qmbAuthoringCP().newRow(hcpUser, hcpUser.getName().toString());
        form.qmbAuthoringCP().setValue(hcpUser);
    }
    form.dtimAuthoring().setValue(new DateTime());      
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControlsWithDefaultValues()
{
    form.dteStarted().setValue(new DateTime());
    form.qmbHCP().clear();
    Hcp hcp = (Hcp)domain.getHcpUser();
    if(hcp != null)
    {
        form.qmbHCP().newRow(hcp, getHCPName(hcp));
        form.qmbHCP().setValue(hcp);
    }
    form.setMode(FormMode.EDIT);        
}
项目:AvoinApotti    文件:Logic.java   
private void setDefaultValues() 
{
    if (domain.getHcpUser() != null)
    {
        form.qmbRecordingHCP().clear();
        form.qmbRecordingHCP().newRow((Hcp) domain.getHcpUser(), domain.getHcpUser().toString());
        form.qmbRecordingHCP().setValue((Hcp) domain.getHcpUser());         
    }

    form.dteRecorded().setValue(new DateTime().getDate());
    form.tmeRecorded().setValue(new DateTime().getTime());
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbResolvedByTextSubmited(String value) throws PresentationLogicException 
{
    form.ctnDetails().qmbResolvedBy().clear();
    Hcp filter = new Hcp();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);
    filter.setHcpType(HcpDisType.MEDICAL);

    HcpCollection voHCPColl = domain.listHCPs(filter);

    if(voHCPColl != null)
    {
        for (int i = 0; i < voHCPColl.size(); i++)
        {
            form.ctnDetails().qmbResolvedBy().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString());
        }
        if (voHCPColl.size() == 1)
        {
            form.ctnDetails().qmbResolvedBy().setValue(voHCPColl.get(0));
        }
        else if (voHCPColl.size() > 1)
        {
            form.ctnDetails().qmbResolvedBy().showOpened();     
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void checkForDiscipline(ClinicalNotesShortVo voClinNote)
{
    MemberOfStaffShortVo mos = null;
    if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
        mos = getDisciplineForLoggedInUser(domain.getClinicalNote((ClinicalNotesShortVo)form.dyngrdNotes().getValue()));
    else
        engine.showMessage("No discipline for logged in user");

    Hcp voHcp = (Hcp) domain.getHcpUser();

    if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull() )
        {
            if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
                    form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
                        mos != null &&
                            mos.getHcpIsNotNull())
                    {
                        if (!domain.getClinicalNote(voClinNote).getDiscipline().equals(mos.getHcp().getHcpType()))
                        {
                            form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
                        }


                        if (rulesForValidationContexMenus(voClinNote, voHcp))
                        {
                            form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
                        }

                        if (ClinicalNoteType.DISCHARGENOTE.equals(form.getGlobalContext().Clinical.getCurrentClinicalNote().getNoteType()) ||
                                ClinicalNoteType.SUMMARYATADMISSION.equals(form.getGlobalContext().Clinical.getCurrentClinicalNote().getNoteType()))
                        {
                            form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
                        }
                    }
        }
}
项目:AvoinApotti    文件:Logic.java   
private void newParentInstance()
{
    GaitVo voNewParent = new GaitVo();  
    voNewParent.setAuthoringHCP((Hcp) domain.getHcpUser());
    voNewParent.setAuthoringDateTime(new DateTime());
    voNewParent.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voNewParent.setGaitTreatment(new GaitTreatmentVoCollection());
    populateParentInstanceControls(voNewParent);        
    form.getLocalContext().setSelectedParentInstance(voNewParent);  
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbConfirmedByTextSubmited(String value) throws PresentationLogicException 
{
    if(value == null)
        return;

    form.qmbConfirmedBy().clear();

    HcpFilter filter = new HcpFilter();
    PersonName name = new PersonName();
    name.setSurname(value);
    filter.setQueryName(name);

    HcpCollection coll = domain.listMedics(filter);
    for (int i = 0; i < coll.size(); i++)
    {
        Hcp med = coll.get(i);
        form.qmbConfirmedBy().newRow(med, med.toString());          
    }
    if (coll.size() == 1)
    {
        form.qmbConfirmedBy().setValue(coll.get(0));
        populateConfirmedData();
    }
    else if (coll.size() > 1)
    {
        form.qmbConfirmedBy().showOpened();     
    }   
}