Java 类ims.core.vo.lookups.PersonRelationship 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
    {
        if(!ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
            form.ccAddressSearch().setPhoneVisible(false);
    }

    if (form.getGlobalContext().Core.getNOKDetailsIsNotNull())
    {
        NextOfKin nok = (NextOfKin) form.getGlobalContext().Core.getNOKDetails().clone();
        populateScreenFromData( nok.getAddress());

        if (nok.getName() != null)
        {
            form.cmbTitle().setValue(nok.getName().getTitle());
            form.txtNOKSName().setValue(nok.getName().getSurname());
            form.txtNOKMiddlename().setValue(nok.getName().getMiddleName());
            form.txtNOKForename().setValue(nok.getName().getForename());
        }

        if(nok.getCommChannelsIsNotNull())
        {
            if(nok.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE) != null)
                form.txtPhoneWork().setValue(nok.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE).getCommValue());

            //WDEV-8427 - interface uses commchannel but screen uses phone field in NOK
            if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
            {
                if(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) != null)
                {           
                    if(nok.getAddressIsNotNull())
                        nok.getAddress().setPhone(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue());

                    if(nok.getAddress() == null)
                    {
                        nok.setAddress(new PersonAddress());
                        nok.getAddress().setPhone(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue());
                    }

                    form.ccAddressSearch().setValue(nok.getAddress());
                }
            }
        }

        if (nok.getRelationship() == null)
        {
            if (form.getGlobalContext().Core.getNOKDetails().getTempFieldIsNotNull())
            {
                PersonRelationship lkupPersonRelationship = new PersonRelationship();
                form.cmbRelationship().newRow(lkupPersonRelationship, form.getGlobalContext().Core.getNOKDetails().getTempField());
                form.cmbRelationship().setValue(lkupPersonRelationship);
            }
        }
        else if (nok.getRelationshipIsNotNull())
            form.cmbRelationship().setValue(form.getGlobalContext().Core.getNOKDetails().getRelationship());
    }

    // Unless using local patient registration, this form should go to view
    // mode only
    if ((!ims.configuration.gen.ConfigFlag.DOM.LOCAL_PATIENT_REGISTRATION.getValue()) || form.getGlobalContext().Core.getParentFormMode().equals(FormMode.VIEW))
    {
        form.setMode(FormMode.VIEW);
        form.ccAddressSearch().setMode(FormMode.VIEW);
        form.ccAddressSearch().setComponentEnabled(false);
    }
    else
    {
        form.ccAddressSearch().setMode(FormMode.EDIT);
        form.ccAddressSearch().setComponentEnabled(true);
    }

    updateControlsState();//WDEV-17185
}
项目:openMAXIMS    文件:PdsQuery.java   
public PersonRelationship getPersonRelationship(String pdsRelationship)
{
    PersonRelationship instance = (PersonRelationship)domain.getLookupService().getLocalLookup(PersonRelationship.class, PersonRelationship.TYPE_ID, "PDS", pdsRelationship);

    return instance;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
    {
        if(!ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
            form.ccAddressSearch().setPhoneVisible(false);
    }

    if (form.getGlobalContext().Core.getNOKDetailsIsNotNull())
    {
        NextOfKin nok = (NextOfKin) form.getGlobalContext().Core.getNOKDetails().clone();
        populateScreenFromData( nok.getAddress());

        if (nok.getName() != null)
        {
            form.cmbTitle().setValue(nok.getName().getTitle());
            form.txtNOKSName().setValue(nok.getName().getSurname());
            form.txtNOKMiddlename().setValue(nok.getName().getMiddleName());
            form.txtNOKForename().setValue(nok.getName().getForename());
        }

        if(nok.getCommChannelsIsNotNull())
        {
            if(nok.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE) != null)
                form.txtPhoneWork().setValue(nok.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE).getCommValue());

            //WDEV-8427 - interface uses commchannel but screen uses phone field in NOK
            if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
            {
                if(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) != null)
                {           
                    if(nok.getAddressIsNotNull())
                        nok.getAddress().setPhone(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue());

                    if(nok.getAddress() == null)
                    {
                        nok.setAddress(new PersonAddress());
                        nok.getAddress().setPhone(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue());
                    }

                    form.ccAddressSearch().setValue(nok.getAddress());
                }
            }
        }

        if (nok.getRelationship() == null)
        {
            if (form.getGlobalContext().Core.getNOKDetails().getTempFieldIsNotNull())
            {
                PersonRelationship lkupPersonRelationship = new PersonRelationship();
                form.cmbRelationship().newRow(lkupPersonRelationship, form.getGlobalContext().Core.getNOKDetails().getTempField());
                form.cmbRelationship().setValue(lkupPersonRelationship);
            }
        }
        else if (nok.getRelationshipIsNotNull())
            form.cmbRelationship().setValue(form.getGlobalContext().Core.getNOKDetails().getRelationship());
    }

    // Unless using local patient registration, this form should go to view
    // mode only
    if ((!ims.configuration.gen.ConfigFlag.DOM.LOCAL_PATIENT_REGISTRATION.getValue()) || form.getGlobalContext().Core.getParentFormMode().equals(FormMode.VIEW))
    {
        form.setMode(FormMode.VIEW);
        form.ccAddressSearch().setMode(FormMode.VIEW);
        form.ccAddressSearch().setComponentEnabled(false);
    }
    else
    {
        form.ccAddressSearch().setMode(FormMode.EDIT);
        form.ccAddressSearch().setComponentEnabled(true);
    }

    updateControlsState();//WDEV-17185
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen() throws FormOpenException
{
    if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
    {
        if(!ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
            form.ccAddressSearch().setPhoneVisible(false);
    }

    if (form.getGlobalContext().Core.getNOKDetailsIsNotNull())
    {
        NextOfKin nok = (NextOfKin) form.getGlobalContext().Core.getNOKDetails().clone();
        populateScreenFromData( nok.getAddress());

        if (nok.getName() != null)
        {
            form.cmbTitle().setValue(nok.getName().getTitle());
            form.txtNOKSName().setValue(nok.getName().getSurname());
            form.txtNOKMiddlename().setValue(nok.getName().getMiddleName());
            form.txtNOKForename().setValue(nok.getName().getForename());
        }

        if(nok.getCommChannelsIsNotNull())
        {
            if(nok.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE) != null)
                form.txtPhoneWork().setValue(nok.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE).getCommValue());

            //WDEV-8427 - interface uses commchannel but screen uses phone field in NOK
            if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
            {
                if(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) != null)
                {           
                    if(nok.getAddressIsNotNull())
                        nok.getAddress().setPhone(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue());

                    if(nok.getAddress() == null)
                    {
                        nok.setAddress(new PersonAddress());
                        nok.getAddress().setPhone(nok.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue());
                    }

                    form.ccAddressSearch().setValue(nok.getAddress());
                }
            }
        }

        if (nok.getRelationship() == null)
        {
            if (form.getGlobalContext().Core.getNOKDetails().getTempFieldIsNotNull())
            {
                PersonRelationship lkupPersonRelationship = new PersonRelationship();
                form.cmbRelationship().newRow(lkupPersonRelationship, form.getGlobalContext().Core.getNOKDetails().getTempField());
                form.cmbRelationship().setValue(lkupPersonRelationship);
            }
        }
        else if (nok.getRelationshipIsNotNull())
            form.cmbRelationship().setValue(form.getGlobalContext().Core.getNOKDetails().getRelationship());
    }

    // Unless using local patient registration, this form should go to view
    // mode only
    if ((!ims.configuration.gen.ConfigFlag.DOM.LOCAL_PATIENT_REGISTRATION.getValue()) || form.getGlobalContext().Core.getParentFormMode().equals(FormMode.VIEW))
    {
        form.setMode(FormMode.VIEW);
        form.ccAddressSearch().setMode(FormMode.VIEW);
        form.ccAddressSearch().setComponentEnabled(false);
    }
    else
    {
        form.ccAddressSearch().setMode(FormMode.EDIT);
        form.ccAddressSearch().setComponentEnabled(true);
    }

    updateControlsState();//WDEV-17185
}