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

项目:AvoinApotti    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 
                        && form.getMode().equals(FormMode.EDIT);

    //form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS)
        && form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN))
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull()
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN)
        && ! ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

}
项目:openMAXIMS    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 
                        && form.getMode().equals(FormMode.EDIT);

    //form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS)
        && form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN))
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull()
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN)
        && ! ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

    form.getContextMenus().Core.getIdentifierGridCOPYItem().setVisible(form.grdIdentifiers().getSelectedRow() != null);

}
项目:openMAXIMS    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 
                        && form.getMode().equals(FormMode.EDIT);

    //form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS)
        && form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN))
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull()
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN)
        && ! ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

}
项目:openmaxims-linux    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 
                        && form.getMode().equals(FormMode.EDIT);

    //form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull()
        && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS)
        && form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN))
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null
        && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull()
        && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN)
        && ! ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false);

}
项目:openMAXIMS    文件:Logic.java   
private boolean doSave(Boolean decouplePatientRecord) 
{
    Patient initialPatient = form.getLocalContext().getLPIPatient();
    Patient patient = form.getLocalContext().getResultedPatient();
    Patient pdsPatient = form.getLocalContext().getPDSPatient();

    patient = populateDataFromScreen(patient);

    // WDEV-21883
    patient.setSCN(pdsPatient.getSCN());
    patient.setSourceOfInformation(RegistrationSourceOfInfo.PDS);

    if(form.getForms().Core.PDSDemographics.equals(form.getLocalContext().getParentForm()))
    {
        form.getGlobalContext().Core.setPatientToBeSynchronized(patient);
        return true;
    }



    //WDEV-21387
    //Also set decoupled to false as the intention herer is to synchronise
    patient.setDecoupled(new Boolean(false));

    String[] errors = patient.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    if(decouplePatientRecord == null && patient.getDodIsNotNull())
    {
        if(!patient.getDod().equals(initialPatient.getDod()))
        {
            form.getGlobalContext().Core.setYesNoDialogMessage("Would you like to decouple the patient record from PDS?");
            engine.open(form.getForms().Core.YesNoDialog);
            return false;
        }
    }

    PdsPatientUpdateHelper updateHelper = new PdsPatientUpdateHelper(domain);
    updateHelper.setPatientUpdateFields(patient, initialPatient);

    //WDEV-21392
    //set nhs number verified 
    for (int i = 0; patient.getIdentifiersIsNotNull() && i < patient.getIdentifiers().size(); i++)
    {
        if (patient.getIdentifiers().get(i).getTypeIsNotNull() && patient.getIdentifiers().get(i).getType().equals(PatIdType.NHSN))
        {
            patient.getIdentifiers().get(i).setVerified(true);
            break;
        }
    }
    //WDEV-21392

    return save(patient, false, null, null, true, decouplePatientRecord);
}
项目:AvoinApotti    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 && form.getMode().equals(FormMode.EDIT);

    form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS) && form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue() != null && PatIdType.NHSN.equals(form.grdIdentifiers().getSelectedRow().getValue().getType()))//  WDEV-15197
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull() && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN) && !ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

}
项目:openMAXIMS    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 && form.getMode().equals(FormMode.EDIT);

    form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS) && form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue() != null && PatIdType.NHSN.equals(form.grdIdentifiers().getSelectedRow().getValue().getType()))//  WDEV-15197
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull() && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN) && !ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

    form.getContextMenus().getGenericGridCOPYItem().setVisible(form.grdIdentifiers().getSelectedRow() != null);

}
项目:openMAXIMS    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 && form.getMode().equals(FormMode.EDIT);

    form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS) && form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue() != null && PatIdType.NHSN.equals(form.grdIdentifiers().getSelectedRow().getValue().getType()))//  WDEV-15197
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull() && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN) && !ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

}
项目:openmaxims-linux    文件:Logic.java   
private void setRemoveMenuVisibility()
{
    boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 && form.getMode().equals(FormMode.EDIT);

    form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible);

    if (form.getLocalContext().getPatientIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS) && form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue() != null && PatIdType.NHSN.equals(form.grdIdentifiers().getSelectedRow().getValue().getType()))//  WDEV-15197
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

    if (form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull() && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN) && !ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
        form.getContextMenus().getGenericGridRemoveItem().setVisible(false);

}