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

项目:AvoinApotti    文件:Logic.java   
private void removeFamilySupport() 
{
    if(form.getLocalContext().getvoFamilySupportCollIsNotNull() && form.grdFamily().getValue() != null)
    {
        for(int i =0; i<form.getLocalContext().getvoFamilySupportColl().size(); i++)
        {
            SupportNetworkFamily tempSupportNetworkFamily = form.getLocalContext().getvoFamilySupportColl().get(i);
            if(tempSupportNetworkFamily.equals(form.grdFamily().getValue()))
            {
                tempSupportNetworkFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);
                form.getLocalContext().getvoFamilySupportRemovedColl().add(tempSupportNetworkFamily);
            }
        }
    }

    form.grdFamily().getRows().remove(form.grdFamily().getSelectedRowIndex());
}
项目:AvoinApotti    文件:Logic.java   
private String createInactivateTooltip(SupportNetworkFamily voFamily)
{
    if(voFamily == null)
        return null;

    StringBuffer sb = new StringBuffer();

    if(voFamily.getInactivatingUserIsNotNull())
    {
        sb.append("<b>Inactivating User : </b>");
        sb.append(voFamily.getInactivatingUser().getIMosName());
        sb.append("<br>");
    }

    if(voFamily.getInactivatingDateTimeIsNotNull())
    {
        sb.append("<b>Inactivating Date : </b>");
        sb.append(voFamily.getInactivatingDateTime().toString());
        sb.append("<br>");
    }

    return sb.toString();
}
项目:AvoinApotti    文件:Logic.java   
private boolean isEmergencyContactUsed() 
{
    boolean bContactUsed = false;

    SupportNetworkEmergencyContact contact = form.ctnFamilySupport().cmbEmergency().getValue();
    SupportNetworkFamily voFamily = form.grdFamily().getValue();

    if(contact == null)
        return false;

    GenForm.grdFamilyRow row = null;
    for(int i=0;i<form.grdFamily().getRows().size();i++)
    {
        row = form.grdFamily().getRows().get(i);
        if(row.getValue().getIsCurrentlyActiveFamilySupport().booleanValue())
        {
            if(contact.equals(row.getValue().getEmergencyContactOrder()) && voFamily != row.getValue()) 
            {
                bContactUsed = true;
            }
        }
    }
    return bContactUsed;
}
项目: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   
protected SupportNetworkFamily populateInstanceData() 
{
    SupportNetworkFamily vo = super.populateDataFromScreen(form.getLocalContext().getSelectedRecord());

    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    //default currently active to true
    if(vo.getIsCurrentlyActiveFamilySupport() == null)
        vo.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    //set authoring information only for new records.
    if (vo.getID_SupportNetworkFamily() == null)
        vo.setAuthoringInfo(form.ctnFamilySupport().customControlAuth().getValue());

    //WDEV-12901 set Recording Information
    if(vo.getRecordingInformation()==null){
        RecordingUserInformationVo voRecordingUserInformation = new RecordingUserInformationVo();
        voRecordingUserInformation.setRecordingUser(form.ctnFamilySupport().cmbRecordingHCP().getValue());
        voRecordingUserInformation.setRecordingDateTime(new DateTime());
        vo.setRecordingInformation(voRecordingUserInformation);
    }

    return vo;
}
项目:AvoinApotti    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    clearInstanceControls();
    form.grdFamily().setValue(null); //WDEV-16078
    form.ctnFamilySupport().txtName().setFocus();
    //form.btnReactivate().setEnabled(false);
    SupportNetworkFamily voFamily = new SupportNetworkFamily();

    form.ctnFamilySupport().customControlAuth().initializeComponent();

    voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE); 
    form.getLocalContext().setSelectedRecord(voFamily);

    form.setMode(FormMode.EDIT);
    form.ctnFamilySupport().setcustomControlAuthEnabled(true);

    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnFamilySupport().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnFamilySupport().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnFamilySupport().dtimRecordingDateTime().setValue(new DateTime());

}
项目:AvoinApotti    文件:Logic.java   
private void newInstanceFromNOK()
{
    form.ctnFamilySupport().customControlAuth().initializeComponent();          
    form.getLocalContext().setSelectedRecord(new SupportNetworkFamily());
    //wdev-16515
    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnFamilySupport().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnFamilySupport().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnFamilySupport().dtimRecordingDateTime().setValue(new DateTime());
    //----------

    if (form.getLocalContext().getNextOfKinIsNotNull())
    {
        form.ctnFamilySupport().txtName().setValue(form.getLocalContext().getNextOfKin().getNameIsNotNull()?form.getLocalContext().getNextOfKin().getName().toString():null);
        form.ctnFamilySupport().txtAddress().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().toDisplayStringForMultiLineTextBox():null);
        form.ctnFamilySupport().txtHomePhone().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().getPhone():null);
        form.ctnFamilySupport().txtMobilrPhone().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);
        form.ctnFamilySupport().txtWorkPhone().setValue(form.getLocalContext().getNextOfKin().getWorkPhoneNumber() != null?form.getLocalContext().getNextOfKin().getWorkPhoneNumber().getCommValue():null);
        form.ctnFamilySupport().txtEmailAddress().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);

        form.setMode(FormMode.EDIT);
    }
}
项目:AvoinApotti    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:AvoinApotti    文件:Logic.java   
private String createFamilyInactivateTooltip(SupportNetworkFamily voFamily)
{
    if(voFamily == null)
        return null;

    StringBuffer sb = new StringBuffer();

    if(voFamily.getInactivatingUserIsNotNull())
    {
        sb.append("<b>Inactivating User : </b>");
        sb.append(voFamily.getInactivatingUser().getIMosName());
        sb.append("<br>");
    }

    if(voFamily.getInactivatingDateTimeIsNotNull())
    {
        sb.append("<b>Inactivating Date : </b>");
        sb.append(voFamily.getInactivatingDateTime().toString());
        sb.append("<br>");
    }

    return sb.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void newFamilyInstanceFromNOK()
{
    form.lyrSupportServices().tabPageFamily().customControlAuthFamily().initializeComponent();          
    form.getLocalContext().setSelectedFamilyRecord(new SupportNetworkFamily());

    if (form.getLocalContext().getNextOfKinIsNotNull())
    {
        form.lyrSupportServices().tabPageFamily().txtName().setValue(form.getLocalContext().getNextOfKin().getNameIsNotNull()?form.getLocalContext().getNextOfKin().getName().toString():null);
        form.lyrSupportServices().tabPageFamily().txtFamilyAddress().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().toDisplayStringForMultiLineTextBox():null);
        form.lyrSupportServices().tabPageFamily().txtHomePhone().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().getPhone():null);
        form.lyrSupportServices().tabPageFamily().txtMobilrPhone().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);
        form.lyrSupportServices().tabPageFamily().txtWorkPhone().setValue(form.getLocalContext().getNextOfKin().getWorkPhoneNumber() != null?form.getLocalContext().getNextOfKin().getWorkPhoneNumber().getCommValue():null);
        form.lyrSupportServices().tabPageFamily().txtEmailAddress().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);

        form.setMode(FormMode.EDIT);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean isEmergencyContactUsed() 
{
    boolean bContactUsed = false;

    SupportNetworkEmergencyContact contact = form.lyrSupportServices().tabPageFamily().cmbEmergency().getValue();
    SupportNetworkFamily voFamily = form.lyrSupportServices().tabPageFamily().grdFamily().getValue();

    if(contact == null)
        return false;

    GenForm.lyrSupportServicesLayer.tabPageFamilyContainer.grdFamilyRow row = null;
    for(int i= 0 ; i < form.lyrSupportServices().tabPageFamily().grdFamily().getRows().size() ; i++)
    {
        row = form.lyrSupportServices().tabPageFamily().grdFamily().getRows().get(i);
        if(row.getValue().getIsCurrentlyActiveFamilySupport().booleanValue())
        {
            if(contact.equals(row.getValue().getEmergencyContactOrder()) && voFamily != row.getValue()) 
            {
                bContactUsed = true;
            }
        }
    }
    return bContactUsed;
}
项目:AvoinApotti    文件:Logic.java   
protected SupportNetworkFamily populateFamilyInstanceData() 
{
    SupportNetworkFamily vo = populateFamilyDataFromScreen(form.getLocalContext().getSelectedFamilyRecord());

    vo.setPatient(form.getLocalContext().getPatientRef());
    //default currently active to true
    if(vo.getIsCurrentlyActiveFamilySupport() == null)
        vo.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    //set authoring information only for new records.
    if (vo.getID_SupportNetworkFamily() == null)
        vo.setAuthoringInfo(form.lyrSupportServices().tabPageFamily().customControlAuthFamily().getValue());

    //WDEV-12901 set Recording Information
    if(vo.getRecordingInformation()==null)
    {
        RecordingUserInformationVo voRecordingUserInformation = new RecordingUserInformationVo();
        voRecordingUserInformation.setRecordingUser(form.lyrSupportServices().tabPageFamily().cmbRecordingHCP().getValue());
        voRecordingUserInformation.setRecordingDateTime(new DateTime());
        vo.setRecordingInformation(voRecordingUserInformation);
    }

    return vo;
}
项目:AvoinApotti    文件:Logic.java   
protected ims.core.vo.SupportNetworkFamily populateFamilyDataFromScreen(ims.core.vo.SupportNetworkFamily value)
{
    if(value == null)
        value = new ims.core.vo.SupportNetworkFamily();

    value.setFitAndWell(new Boolean(form.lyrSupportServices().tabPageFamily().chkFit().getValue()));
    value.setPermissionToContact(new Boolean(form.lyrSupportServices().tabPageFamily().chkPermission().getValue()));
    value.setAwareClientPosition(new Boolean(form.lyrSupportServices().tabPageFamily().chkAware().getValue()));
    value.setCarerName(form.lyrSupportServices().tabPageFamily().txtName().getValue());
    value.setCarerAddress(form.lyrSupportServices().tabPageFamily().txtFamilyAddress().getValue());
    value.setCarerEmail(form.lyrSupportServices().tabPageFamily().txtEmailAddress().getValue());
    value.setCarerWorkPhone(form.lyrSupportServices().tabPageFamily().txtWorkPhone().getValue());
    value.setCarerHomePhone(form.lyrSupportServices().tabPageFamily().txtHomePhone().getValue());
    value.setIsMainCarer(new Boolean(form.lyrSupportServices().tabPageFamily().chkCarer().getValue()));
    value.setEmergencyContactOrder(form.lyrSupportServices().tabPageFamily().cmbEmergency().getValue());
    value.setCarerMobilePhone(form.lyrSupportServices().tabPageFamily().txtMobilrPhone().getValue());
    value.setCarerRelationship(form.lyrSupportServices().tabPageFamily().cmbRelationship().getValue());

    return value;
}
项目: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;
}
项目:openMAXIMS    文件:Logic.java   
private void removeFamilySupport() 
{
    if(form.getLocalContext().getvoFamilySupportCollIsNotNull() && form.grdFamily().getValue() != null)
    {
        for(int i =0; i<form.getLocalContext().getvoFamilySupportColl().size(); i++)
        {
            SupportNetworkFamily tempSupportNetworkFamily = form.getLocalContext().getvoFamilySupportColl().get(i);
            if(tempSupportNetworkFamily.equals(form.grdFamily().getValue()))
            {
                tempSupportNetworkFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);
                form.getLocalContext().getvoFamilySupportRemovedColl().add(tempSupportNetworkFamily);
            }
        }
    }

    form.grdFamily().getRows().remove(form.grdFamily().getSelectedRowIndex());
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws PresentationLogicException
{

    initialize();

    //WDEV-19389 
    if(engine.getFormName().equals(form.getForms().Core.SupportNetworkFamily))
    {
        if (!(form.getGlobalContext().Core.getPatientShortIsNotNull() && form.getGlobalContext().Core.getSupportNetworkFamilySearchCriteriaIsNotNull() && form.getGlobalContext().Core.getPatientShort().equals(form.getGlobalContext().Core.getSupportNetworkFamilySearchCriteria().getPatient())))
            form.getGlobalContext().Core.setSupportNetworkFamilySearchCriteria(null);

        doSearchCriteria(form.getGlobalContext().Core.getSupportNetworkFamilySearchCriteria());         
    }
    if(engine.getFormName().equals(form.getForms().Core.SupportNetworkFamilyNursingAssessment))
    {
        if (!(form.getGlobalContext().Core.getPatientShortIsNotNull() && form.getGlobalContext().Core.getSupportNetworkFamilyAliasSearchCriteriaIsNotNull() && form.getGlobalContext().Core.getPatientShort().equals(form.getGlobalContext().Core.getSupportNetworkFamilyAliasSearchCriteria().getPatient())))
            form.getGlobalContext().Core.setSupportNetworkFamilyAliasSearchCriteria(null);

        doSearchCriteria(form.getGlobalContext().Core.getSupportNetworkFamilyAliasSearchCriteria());
    }
    //WDEV-19389 - end

}
项目:openMAXIMS    文件:Logic.java   
private String createInactivateTooltip(SupportNetworkFamily voFamily)
{
    if(voFamily == null)
        return null;

    StringBuffer sb = new StringBuffer();

    if(voFamily.getInactivatingUserIsNotNull())
    {
        sb.append("<b>Inactivating User : </b>");
        sb.append(voFamily.getInactivatingUser().getIMosName());
        sb.append("<br>");
    }

    if(voFamily.getInactivatingDateTimeIsNotNull())
    {
        sb.append("<b>Inactivating Date : </b>");
        sb.append(voFamily.getInactivatingDateTime().toString());
        sb.append("<br>");
    }

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private boolean isEmergencyContactUsed() 
{
    boolean bContactUsed = false;

    SupportNetworkEmergencyContact contact = form.ctnFamilySupport().cmbEmergency().getValue();
    SupportNetworkFamily voFamily = form.grdFamily().getValue();

    if(contact == null)
        return false;

    GenForm.grdFamilyRow row = null;
    for(int i=0;i<form.grdFamily().getRows().size();i++)
    {
        row = form.grdFamily().getRows().get(i);
        if(row.getValue().getIsCurrentlyActiveFamilySupport().booleanValue())
        {
            if(contact.equals(row.getValue().getEmergencyContactOrder()) && voFamily != row.getValue()) 
            {
                bContactUsed = true;
            }
        }
    }
    return bContactUsed;
}
项目:openMAXIMS    文件: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); 
}
项目:openMAXIMS    文件:Logic.java   
protected SupportNetworkFamily populateInstanceData() 
{
    SupportNetworkFamily vo = super.populateDataFromScreen(form.getLocalContext().getSelectedRecord());

    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    //default currently active to true
    if(vo.getIsCurrentlyActiveFamilySupport() == null)
        vo.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    //set authoring information only for new records.
    if (vo.getID_SupportNetworkFamily() == null)
        vo.setAuthoringInfo(form.ctnFamilySupport().customControlAuth().getValue());

    //WDEV-12901 set Recording Information
    if(vo.getRecordingInformation()==null){
        RecordingUserInformationVo voRecordingUserInformation = new RecordingUserInformationVo();
        voRecordingUserInformation.setRecordingUser(form.ctnFamilySupport().cmbRecordingHCP().getValue());
        voRecordingUserInformation.setRecordingDateTime(new DateTime());
        vo.setRecordingInformation(voRecordingUserInformation);
    }

    return vo;
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    clearInstanceControls();
    form.grdFamily().setValue(null); //WDEV-16078
    form.ctnFamilySupport().txtName().setFocus();
    //form.btnReactivate().setEnabled(false);
    SupportNetworkFamily voFamily = new SupportNetworkFamily();

    form.ctnFamilySupport().customControlAuth().initializeComponent();

    voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE); 
    form.getLocalContext().setSelectedRecord(voFamily);

    form.setMode(FormMode.EDIT);
    form.ctnFamilySupport().setcustomControlAuthEnabled(true);

    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnFamilySupport().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnFamilySupport().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnFamilySupport().dtimRecordingDateTime().setValue(new DateTime());

}
项目:openMAXIMS    文件:Logic.java   
private void newInstanceFromNOK()
{
    form.ctnFamilySupport().customControlAuth().initializeComponent();          
    form.getLocalContext().setSelectedRecord(new SupportNetworkFamily());
    //wdev-16515
    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnFamilySupport().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnFamilySupport().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnFamilySupport().dtimRecordingDateTime().setValue(new DateTime());
    //----------

    if (form.getLocalContext().getNextOfKinIsNotNull())
    {
        form.ctnFamilySupport().txtName().setValue(form.getLocalContext().getNextOfKin().getNameIsNotNull()?form.getLocalContext().getNextOfKin().getName().toString():null);
        form.ctnFamilySupport().txtAddress().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().toDisplayStringForMultiLineTextBox():null);
        form.ctnFamilySupport().txtHomePhone().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().getPhone():null);
        form.ctnFamilySupport().txtMobilrPhone().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);
        form.ctnFamilySupport().txtWorkPhone().setValue(form.getLocalContext().getNextOfKin().getWorkPhoneNumber() != null?form.getLocalContext().getNextOfKin().getWorkPhoneNumber().getCommValue():null);
        form.ctnFamilySupport().txtEmailAddress().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);

        form.setMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:openMAXIMS    文件:Logic.java   
private String createFamilyInactivateTooltip(SupportNetworkFamily voFamily)
{
    if(voFamily == null)
        return null;

    StringBuffer sb = new StringBuffer();

    if(voFamily.getInactivatingUserIsNotNull())
    {
        sb.append("<b>Inactivating User : </b>");
        sb.append(voFamily.getInactivatingUser().getIMosName());
        sb.append("<br>");
    }

    if(voFamily.getInactivatingDateTimeIsNotNull())
    {
        sb.append("<b>Inactivating Date : </b>");
        sb.append(voFamily.getInactivatingDateTime().toString());
        sb.append("<br>");
    }

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void newFamilyInstanceFromNOK()
{
    form.lyrSupportServices().tabPageFamily().customControlAuthFamily().initializeComponent();          
    form.getLocalContext().setSelectedFamilyRecord(new SupportNetworkFamily());

    if (form.getLocalContext().getNextOfKinIsNotNull())
    {
        form.lyrSupportServices().tabPageFamily().txtName().setValue(form.getLocalContext().getNextOfKin().getNameIsNotNull()?form.getLocalContext().getNextOfKin().getName().toString():null);
        form.lyrSupportServices().tabPageFamily().txtFamilyAddress().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().toDisplayStringForMultiLineTextBox():null);
        form.lyrSupportServices().tabPageFamily().txtHomePhone().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().getPhone():null);
        form.lyrSupportServices().tabPageFamily().txtMobilrPhone().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);
        form.lyrSupportServices().tabPageFamily().txtWorkPhone().setValue(form.getLocalContext().getNextOfKin().getWorkPhoneNumber() != null?form.getLocalContext().getNextOfKin().getWorkPhoneNumber().getCommValue():null);
        form.lyrSupportServices().tabPageFamily().txtEmailAddress().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);

        form.setMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean isEmergencyContactUsed() 
{
    boolean bContactUsed = false;

    SupportNetworkEmergencyContact contact = form.lyrSupportServices().tabPageFamily().cmbEmergency().getValue();
    SupportNetworkFamily voFamily = form.lyrSupportServices().tabPageFamily().grdFamily().getValue();

    if(contact == null)
        return false;

    GenForm.lyrSupportServicesLayer.tabPageFamilyContainer.grdFamilyRow row = null;
    for(int i= 0 ; i < form.lyrSupportServices().tabPageFamily().grdFamily().getRows().size() ; i++)
    {
        row = form.lyrSupportServices().tabPageFamily().grdFamily().getRows().get(i);
        if(row.getValue().getIsCurrentlyActiveFamilySupport().booleanValue())
        {
            if(contact.equals(row.getValue().getEmergencyContactOrder()) && voFamily != row.getValue()) 
            {
                bContactUsed = true;
            }
        }
    }
    return bContactUsed;
}
项目:openMAXIMS    文件:Logic.java   
protected SupportNetworkFamily populateFamilyInstanceData() 
{
    SupportNetworkFamily vo = populateFamilyDataFromScreen(form.getLocalContext().getSelectedFamilyRecord());

    vo.setPatient(form.getLocalContext().getPatientRef());
    //default currently active to true
    if(vo.getIsCurrentlyActiveFamilySupport() == null)
        vo.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    //set authoring information only for new records.
    if (vo.getID_SupportNetworkFamily() == null)
        vo.setAuthoringInfo(form.lyrSupportServices().tabPageFamily().customControlAuthFamily().getValue());

    //WDEV-12901 set Recording Information
    if(vo.getRecordingInformation()==null)
    {
        RecordingUserInformationVo voRecordingUserInformation = new RecordingUserInformationVo();
        voRecordingUserInformation.setRecordingUser(form.lyrSupportServices().tabPageFamily().cmbRecordingHCP().getValue());
        voRecordingUserInformation.setRecordingDateTime(new DateTime());
        vo.setRecordingInformation(voRecordingUserInformation);
    }

    return vo;
}
项目:openMAXIMS    文件:Logic.java   
protected ims.core.vo.SupportNetworkFamily populateFamilyDataFromScreen(ims.core.vo.SupportNetworkFamily value)
{
    if(value == null)
        value = new ims.core.vo.SupportNetworkFamily();

    value.setFitAndWell(new Boolean(form.lyrSupportServices().tabPageFamily().chkFit().getValue()));
    value.setPermissionToContact(new Boolean(form.lyrSupportServices().tabPageFamily().chkPermission().getValue()));
    value.setAwareClientPosition(new Boolean(form.lyrSupportServices().tabPageFamily().chkAware().getValue()));
    value.setCarerName(form.lyrSupportServices().tabPageFamily().txtName().getValue());
    value.setCarerAddress(form.lyrSupportServices().tabPageFamily().txtFamilyAddress().getValue());
    value.setCarerEmail(form.lyrSupportServices().tabPageFamily().txtEmailAddress().getValue());
    value.setCarerWorkPhone(form.lyrSupportServices().tabPageFamily().txtWorkPhone().getValue());
    value.setCarerHomePhone(form.lyrSupportServices().tabPageFamily().txtHomePhone().getValue());
    value.setIsMainCarer(new Boolean(form.lyrSupportServices().tabPageFamily().chkCarer().getValue()));
    value.setEmergencyContactOrder(form.lyrSupportServices().tabPageFamily().cmbEmergency().getValue());
    value.setCarerMobilePhone(form.lyrSupportServices().tabPageFamily().txtMobilrPhone().getValue());
    value.setCarerRelationship(form.lyrSupportServices().tabPageFamily().cmbRelationship().getValue());

    return value;
}
项目:openMAXIMS    文件: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;
}
项目:openMAXIMS    文件:Logic.java   
private void removeFamilySupport() 
{
    if(form.getLocalContext().getvoFamilySupportCollIsNotNull() && form.grdFamily().getValue() != null)
    {
        for(int i =0; i<form.getLocalContext().getvoFamilySupportColl().size(); i++)
        {
            SupportNetworkFamily tempSupportNetworkFamily = form.getLocalContext().getvoFamilySupportColl().get(i);
            if(tempSupportNetworkFamily.equals(form.grdFamily().getValue()))
            {
                tempSupportNetworkFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);
                form.getLocalContext().getvoFamilySupportRemovedColl().add(tempSupportNetworkFamily);
            }
        }
    }

    form.grdFamily().getRows().remove(form.grdFamily().getSelectedRowIndex());
}
项目:openMAXIMS    文件:Logic.java   
private String createInactivateTooltip(SupportNetworkFamily voFamily)
{
    if(voFamily == null)
        return null;

    StringBuffer sb = new StringBuffer();

    if(voFamily.getInactivatingUserIsNotNull())
    {
        sb.append("<b>Inactivating User : </b>");
        sb.append(voFamily.getInactivatingUser().getIMosName());
        sb.append("<br>");
    }

    if(voFamily.getInactivatingDateTimeIsNotNull())
    {
        sb.append("<b>Inactivating Date : </b>");
        sb.append(voFamily.getInactivatingDateTime().toString());
        sb.append("<br>");
    }

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private boolean isEmergencyContactUsed() 
{
    boolean bContactUsed = false;

    SupportNetworkEmergencyContact contact = form.ctnFamilySupport().cmbEmergency().getValue();
    SupportNetworkFamily voFamily = form.grdFamily().getValue();

    if(contact == null)
        return false;

    GenForm.grdFamilyRow row = null;
    for(int i=0;i<form.grdFamily().getRows().size();i++)
    {
        row = form.grdFamily().getRows().get(i);
        if(row.getValue().getIsCurrentlyActiveFamilySupport().booleanValue())
        {
            if(contact.equals(row.getValue().getEmergencyContactOrder()) && voFamily != row.getValue()) 
            {
                bContactUsed = true;
            }
        }
    }
    return bContactUsed;
}
项目:openMAXIMS    文件: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); 
}
项目:openMAXIMS    文件:Logic.java   
protected SupportNetworkFamily populateInstanceData() 
{
    SupportNetworkFamily vo = super.populateDataFromScreen(form.getLocalContext().getSelectedRecord());

    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    //default currently active to true
    if(vo.getIsCurrentlyActiveFamilySupport() == null)
        vo.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);

    //set authoring information only for new records.
    if (vo.getID_SupportNetworkFamily() == null)
        vo.setAuthoringInfo(form.ctnFamilySupport().customControlAuth().getValue());

    //WDEV-12901 set Recording Information
    if(vo.getRecordingInformation()==null){
        RecordingUserInformationVo voRecordingUserInformation = new RecordingUserInformationVo();
        voRecordingUserInformation.setRecordingUser(form.ctnFamilySupport().cmbRecordingHCP().getValue());
        voRecordingUserInformation.setRecordingDateTime(new DateTime());
        vo.setRecordingInformation(voRecordingUserInformation);
    }

    return vo;
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    clearInstanceControls();
    form.grdFamily().setValue(null); //WDEV-16078
    form.ctnFamilySupport().txtName().setFocus();
    //form.btnReactivate().setEnabled(false);
    SupportNetworkFamily voFamily = new SupportNetworkFamily();

    form.ctnFamilySupport().customControlAuth().initializeComponent();

    voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE); 
    form.getLocalContext().setSelectedRecord(voFamily);

    form.setMode(FormMode.EDIT);
    form.ctnFamilySupport().setcustomControlAuthEnabled(true);

    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnFamilySupport().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnFamilySupport().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnFamilySupport().dtimRecordingDateTime().setValue(new DateTime());

}
项目:openMAXIMS    文件:Logic.java   
private void newInstanceFromNOK()
{
    form.ctnFamilySupport().customControlAuth().initializeComponent();          
    form.getLocalContext().setSelectedRecord(new SupportNetworkFamily());
    //wdev-16515
    Object mos = domain.getMosUser();
    if(mos != null){
        form.ctnFamilySupport().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
        form.ctnFamilySupport().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
    }
    form.ctnFamilySupport().dtimRecordingDateTime().setValue(new DateTime());
    //----------

    if (form.getLocalContext().getNextOfKinIsNotNull())
    {
        form.ctnFamilySupport().txtName().setValue(form.getLocalContext().getNextOfKin().getNameIsNotNull()?form.getLocalContext().getNextOfKin().getName().toString():null);
        form.ctnFamilySupport().txtAddress().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().toDisplayStringForMultiLineTextBox():null);
        form.ctnFamilySupport().txtHomePhone().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().getPhone():null);
        form.ctnFamilySupport().txtMobilrPhone().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);
        form.ctnFamilySupport().txtWorkPhone().setValue(form.getLocalContext().getNextOfKin().getWorkPhoneNumber() != null?form.getLocalContext().getNextOfKin().getWorkPhoneNumber().getCommValue():null);
        form.ctnFamilySupport().txtEmailAddress().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);

        form.setMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:openMAXIMS    文件:Logic.java   
private String createFamilyInactivateTooltip(SupportNetworkFamily voFamily)
{
    if(voFamily == null)
        return null;

    StringBuffer sb = new StringBuffer();

    if(voFamily.getInactivatingUserIsNotNull())
    {
        sb.append("<b>Inactivating User : </b>");
        sb.append(voFamily.getInactivatingUser().getIMosName());
        sb.append("<br>");
    }

    if(voFamily.getInactivatingDateTimeIsNotNull())
    {
        sb.append("<b>Inactivating Date : </b>");
        sb.append(voFamily.getInactivatingDateTime().toString());
        sb.append("<br>");
    }

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void newFamilyInstanceFromNOK()
{
    form.lyrSupportServices().tabPageFamily().customControlAuthFamily().initializeComponent();          
    form.getLocalContext().setSelectedFamilyRecord(new SupportNetworkFamily());

    if (form.getLocalContext().getNextOfKinIsNotNull())
    {
        form.lyrSupportServices().tabPageFamily().txtName().setValue(form.getLocalContext().getNextOfKin().getNameIsNotNull()?form.getLocalContext().getNextOfKin().getName().toString():null);
        form.lyrSupportServices().tabPageFamily().txtFamilyAddress().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().toDisplayStringForMultiLineTextBox():null);
        form.lyrSupportServices().tabPageFamily().txtHomePhone().setValue(form.getLocalContext().getNextOfKin().getAddressIsNotNull()?form.getLocalContext().getNextOfKin().getAddress().getPhone():null);
        form.lyrSupportServices().tabPageFamily().txtMobilrPhone().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);
        form.lyrSupportServices().tabPageFamily().txtWorkPhone().setValue(form.getLocalContext().getNextOfKin().getWorkPhoneNumber() != null?form.getLocalContext().getNextOfKin().getWorkPhoneNumber().getCommValue():null);
        form.lyrSupportServices().tabPageFamily().txtEmailAddress().setValue(form.getLocalContext().getNextOfKin().getMobile() != null?form.getLocalContext().getNextOfKin().getMobile().getCommValue():null);

        form.setMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean isEmergencyContactUsed() 
{
    boolean bContactUsed = false;

    SupportNetworkEmergencyContact contact = form.lyrSupportServices().tabPageFamily().cmbEmergency().getValue();
    SupportNetworkFamily voFamily = form.lyrSupportServices().tabPageFamily().grdFamily().getValue();

    if(contact == null)
        return false;

    GenForm.lyrSupportServicesLayer.tabPageFamilyContainer.grdFamilyRow row = null;
    for(int i= 0 ; i < form.lyrSupportServices().tabPageFamily().grdFamily().getRows().size() ; i++)
    {
        row = form.lyrSupportServices().tabPageFamily().grdFamily().getRows().get(i);
        if(row.getValue().getIsCurrentlyActiveFamilySupport().booleanValue())
        {
            if(contact.equals(row.getValue().getEmergencyContactOrder()) && voFamily != row.getValue()) 
            {
                bContactUsed = true;
            }
        }
    }
    return bContactUsed;
}