Java 类ims.emergency.vo.ClinicianNoteDefaultTextConfigVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(ClinicianNoteDefaultTextConfigVoCollection coll) throws PresentationLogicException
{
    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        ClinicianNoteDefaultTextConfigVo clinicianNote = coll.get(i);

        grdPresentingProbRow row = form.grdPresentingProb().getRows().newRow();
        row.setcolPresProbl(clinicianNote.getProblem().getPCName());
        row.setcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setTooltipForcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setcolStatus(clinicianNote.getStatus().toString());
        row.setValue(clinicianNote);
    }

    if (form.getLocalContext().getselectedClinicianNote() != null)
    {
        form.getLocalContext().setselectedClinicianNote(domain.getClinicianNote(form.getLocalContext().getselectedClinicianNote()));
        form.grdPresentingProb().setValue(form.getLocalContext().getselectedClinicianNote());
    }

    populateInstanceControlsFromData(form.getLocalContext().getselectedClinicianNote());
}
项目:AvoinApotti    文件:Logic.java   
public void updateControlsState()
{
    form.ctnDetails().setCollapsed(!((form.grdPresentingProb().getValue() != null && form.getMode().equals(FormMode.VIEW)) || form.getMode().equals(FormMode.EDIT)));

    if (form.getMode() == FormMode.VIEW)
    {
        form.btnEdit().setVisible(form.grdPresentingProb().getValue() != null);
        form.btnEdit().setEnabled(form.grdPresentingProb().getValue() != null);
    }

    if (form.getMode() == FormMode.EDIT)
    {
        removePreactiveOrActiveLookup();
    }

    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigNewItem().setVisible(form.getMode().equals(FormMode.VIEW));
    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigEditItem().setVisible(form.getMode().equals(FormMode.VIEW) && form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo);
}
项目:AvoinApotti    文件:Logic.java   
private void getSelectInstance() throws PresentationLogicException
{
    if (form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo)
    {
        ClinicianNoteDefaultTextConfigVo selectedClinicianNote = null;

        selectedClinicianNote = domain.getClinicianNote(form.grdPresentingProb().getValue());

        // Check SOE
        if (form.grdPresentingProb().getValue().getID_ClinicianNoteDefaultTextConfigIsNotNull() && domain.isStale(form.grdPresentingProb().getValue()))
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            open();
            return;
        }

        form.getLocalContext().setselectedClinicianNote(selectedClinicianNote);
        populateInstanceControlsFromData(selectedClinicianNote);
    }
}
项目:AvoinApotti    文件:ClinicianNoteTemplateConfigurationImpl.java   
public Boolean isStale(ClinicianNoteDefaultTextConfigVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingConfigurationVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    if (domainClinicianNote == null)
    {
        return true;
    }

    if (domainClinicianNote.getVersion() > clinicianNote.getVersion_ClinicianNoteDefaultTextConfig())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(ClinicianNoteDefaultTextConfigVoCollection coll) throws PresentationLogicException
{
    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        ClinicianNoteDefaultTextConfigVo clinicianNote = coll.get(i);

        grdPresentingProbRow row = form.grdPresentingProb().getRows().newRow();
        row.setcolPresProbl(clinicianNote.getProblem().getPCName());
        row.setcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setTooltipForcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setcolStatus(clinicianNote.getStatus().toString());
        row.setValue(clinicianNote);
    }

    if (form.getLocalContext().getselectedClinicianNote() != null)
    {
        form.getLocalContext().setselectedClinicianNote(domain.getClinicianNote(form.getLocalContext().getselectedClinicianNote()));
        form.grdPresentingProb().setValue(form.getLocalContext().getselectedClinicianNote());
    }

    populateInstanceControlsFromData(form.getLocalContext().getselectedClinicianNote());
}
项目:openMAXIMS    文件:Logic.java   
public void updateControlsState()
{
    form.ctnDetails().setCollapsed(!((form.grdPresentingProb().getValue() != null && form.getMode().equals(FormMode.VIEW)) || form.getMode().equals(FormMode.EDIT)));

    if (form.getMode() == FormMode.VIEW)
    {
        form.btnEdit().setVisible(form.grdPresentingProb().getValue() != null);
        form.btnEdit().setEnabled(form.grdPresentingProb().getValue() != null);
    }

    if (form.getMode() == FormMode.EDIT)
    {
        removePreactiveOrActiveLookup();
    }

    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigNewItem().setVisible(form.getMode().equals(FormMode.VIEW));
    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigEditItem().setVisible(form.getMode().equals(FormMode.VIEW) && form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo);
}
项目:openMAXIMS    文件:Logic.java   
private void getSelectInstance() throws PresentationLogicException
{
    if (form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo)
    {
        ClinicianNoteDefaultTextConfigVo selectedClinicianNote = null;

        selectedClinicianNote = domain.getClinicianNote(form.grdPresentingProb().getValue());

        // Check SOE
        if (form.grdPresentingProb().getValue().getID_ClinicianNoteDefaultTextConfigIsNotNull() && domain.isStale(form.grdPresentingProb().getValue()))
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            open();
            return;
        }

        form.getLocalContext().setselectedClinicianNote(selectedClinicianNote);
        populateInstanceControlsFromData(selectedClinicianNote);
    }
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public Boolean isStale(ClinicianNoteDefaultTextConfigVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingConfigurationVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    if (domainClinicianNote == null)
    {
        return true;
    }

    if (domainClinicianNote.getVersion() > clinicianNote.getVersion_ClinicianNoteDefaultTextConfig())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(ClinicianNoteDefaultTextConfigVoCollection coll) throws PresentationLogicException
{
    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        ClinicianNoteDefaultTextConfigVo clinicianNote = coll.get(i);

        grdPresentingProbRow row = form.grdPresentingProb().getRows().newRow();
        row.setcolPresProbl(clinicianNote.getProblem().getPCName());
        row.setcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setTooltipForcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setcolStatus(clinicianNote.getStatus().toString());
        row.setValue(clinicianNote);
    }

    if (form.getLocalContext().getselectedClinicianNote() != null)
    {
        form.getLocalContext().setselectedClinicianNote(domain.getClinicianNote(form.getLocalContext().getselectedClinicianNote()));
        form.grdPresentingProb().setValue(form.getLocalContext().getselectedClinicianNote());
    }

    populateInstanceControlsFromData(form.getLocalContext().getselectedClinicianNote());
}
项目:openMAXIMS    文件:Logic.java   
public void updateControlsState()
{
    form.ctnDetails().setCollapsed(!((form.grdPresentingProb().getValue() != null && form.getMode().equals(FormMode.VIEW)) || form.getMode().equals(FormMode.EDIT)));

    if (form.getMode() == FormMode.VIEW)
    {
        form.btnEdit().setVisible(form.grdPresentingProb().getValue() != null);
        form.btnEdit().setEnabled(form.grdPresentingProb().getValue() != null);
    }

    if (form.getMode() == FormMode.EDIT)
    {
        removePreactiveOrActiveLookup();
    }

    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigNewItem().setVisible(form.getMode().equals(FormMode.VIEW));
    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigEditItem().setVisible(form.getMode().equals(FormMode.VIEW) && form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo);
}
项目:openMAXIMS    文件:Logic.java   
private void getSelectInstance() throws PresentationLogicException
{
    if (form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo)
    {
        ClinicianNoteDefaultTextConfigVo selectedClinicianNote = null;

        selectedClinicianNote = domain.getClinicianNote(form.grdPresentingProb().getValue());

        // Check SOE
        if (form.grdPresentingProb().getValue().getID_ClinicianNoteDefaultTextConfigIsNotNull() && domain.isStale(form.grdPresentingProb().getValue()))
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            open();
            return;
        }

        form.getLocalContext().setselectedClinicianNote(selectedClinicianNote);
        populateInstanceControlsFromData(selectedClinicianNote);
    }
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public Boolean isStale(ClinicianNoteDefaultTextConfigVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingConfigurationVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    if (domainClinicianNote == null)
    {
        return true;
    }

    if (domainClinicianNote.getVersion() > clinicianNote.getVersion_ClinicianNoteDefaultTextConfig())
    {
        return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(ClinicianNoteDefaultTextConfigVoCollection coll) throws PresentationLogicException
{
    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        ClinicianNoteDefaultTextConfigVo clinicianNote = coll.get(i);

        grdPresentingProbRow row = form.grdPresentingProb().getRows().newRow();
        row.setcolPresProbl(clinicianNote.getProblem().getPCName());
        row.setcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setTooltipForcolDefaultClinician(clinicianNote.getDefaultClinicianNote());
        row.setcolStatus(clinicianNote.getStatus().toString());
        row.setValue(clinicianNote);
    }

    if (form.getLocalContext().getselectedClinicianNote() != null)
    {
        form.getLocalContext().setselectedClinicianNote(domain.getClinicianNote(form.getLocalContext().getselectedClinicianNote()));
        form.grdPresentingProb().setValue(form.getLocalContext().getselectedClinicianNote());
    }

    populateInstanceControlsFromData(form.getLocalContext().getselectedClinicianNote());
}
项目:openmaxims-linux    文件:Logic.java   
public void updateControlsState()
{
    form.ctnDetails().setCollapsed(!((form.grdPresentingProb().getValue() != null && form.getMode().equals(FormMode.VIEW)) || form.getMode().equals(FormMode.EDIT)));

    if (form.getMode() == FormMode.VIEW)
    {
        form.btnEdit().setVisible(form.grdPresentingProb().getValue() != null);
        form.btnEdit().setEnabled(form.grdPresentingProb().getValue() != null);
    }

    if (form.getMode() == FormMode.EDIT)
    {
        removePreactiveOrActiveLookup();
    }

    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigNewItem().setVisible(form.getMode().equals(FormMode.VIEW));
    form.getContextMenus().Emergency.getClinicianNoteTemplateConfigEditItem().setVisible(form.getMode().equals(FormMode.VIEW) && form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo);
}
项目:openmaxims-linux    文件:Logic.java   
private void getSelectInstance() throws PresentationLogicException
{
    if (form.grdPresentingProb().getValue() instanceof ClinicianNoteDefaultTextConfigVo)
    {
        ClinicianNoteDefaultTextConfigVo selectedClinicianNote = null;

        selectedClinicianNote = domain.getClinicianNote(form.grdPresentingProb().getValue());

        // Check SOE
        if (form.grdPresentingProb().getValue().getID_ClinicianNoteDefaultTextConfigIsNotNull() && domain.isStale(form.grdPresentingProb().getValue()))
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            open();
            return;
        }

        form.getLocalContext().setselectedClinicianNote(selectedClinicianNote);
        populateInstanceControlsFromData(selectedClinicianNote);
    }
}
项目:openmaxims-linux    文件:ClinicianNoteTemplateConfigurationImpl.java   
public Boolean isStale(ClinicianNoteDefaultTextConfigVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingConfigurationVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    if (domainClinicianNote == null)
    {
        return true;
    }

    if (domainClinicianNote.getVersion() > clinicianNote.getVersion_ClinicianNoteDefaultTextConfig())
    {
        return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean presentingProblHaveActiveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave)
{
    ClinicianNoteDefaultTextConfigVoCollection clinicianNote = domain.listClinicianNotes(clinicianNoteToSave.getProblem(), PreActiveActiveInactiveStatus.ACTIVE);

    clinicianNote.remove(clinicianNoteToSave);

    if (clinicianNote.size() == 0)
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControlsFromData(ClinicianNoteDefaultTextConfigVo selectedClinicianNote)
{
    clearInstanceControls();

    if (selectedClinicianNote == null)
        return;

    if (selectedClinicianNote.getDefaultClinicianNoteIsNotNull())
    {
        form.ctnDetails().qmbPresentingProblem().newRow(selectedClinicianNote.getProblem(), selectedClinicianNote.getProblem().getPCName());
        form.ctnDetails().qmbPresentingProblem().setValue(selectedClinicianNote.getProblem());
        form.ctnDetails().richNote().setValue(selectedClinicianNote.getDefaultClinicianNote());
        form.ctnDetails().cmbStatus().setValue(selectedClinicianNote.getStatus());
    }
}
项目:AvoinApotti    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:AvoinApotti    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:AvoinApotti    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:Logic.java   
private boolean presentingProblHaveActiveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave)
{
    ClinicianNoteDefaultTextConfigVoCollection clinicianNote = domain.listClinicianNotes(clinicianNoteToSave.getProblem(), PreActiveActiveInactiveStatus.ACTIVE);

    clinicianNote.remove(clinicianNoteToSave);

    if (clinicianNote.size() == 0)
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsFromData(ClinicianNoteDefaultTextConfigVo selectedClinicianNote)
{
    clearInstanceControls();

    if (selectedClinicianNote == null)
        return;

    if (selectedClinicianNote.getDefaultClinicianNoteIsNotNull())
    {
        form.ctnDetails().qmbPresentingProblem().newRow(selectedClinicianNote.getProblem(), selectedClinicianNote.getProblem().getPCName());
        form.ctnDetails().qmbPresentingProblem().setValue(selectedClinicianNote.getProblem());
        form.ctnDetails().richNote().setValue(selectedClinicianNote.getDefaultClinicianNote());
        form.ctnDetails().cmbStatus().setValue(selectedClinicianNote.getStatus());
    }
}
项目:openMAXIMS    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:Logic.java   
private boolean presentingProblHaveActiveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave)
{
    ClinicianNoteDefaultTextConfigVoCollection clinicianNote = domain.listClinicianNotes(clinicianNoteToSave.getProblem(), PreActiveActiveInactiveStatus.ACTIVE);

    clinicianNote.remove(clinicianNoteToSave);

    if (clinicianNote.size() == 0)
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsFromData(ClinicianNoteDefaultTextConfigVo selectedClinicianNote)
{
    clearInstanceControls();

    if (selectedClinicianNote == null)
        return;

    if (selectedClinicianNote.getDefaultClinicianNoteIsNotNull())
    {
        form.ctnDetails().qmbPresentingProblem().newRow(selectedClinicianNote.getProblem(), selectedClinicianNote.getProblem().getPCName());
        form.ctnDetails().qmbPresentingProblem().setValue(selectedClinicianNote.getProblem());
        form.ctnDetails().richNote().setValue(selectedClinicianNote.getDefaultClinicianNote());
        form.ctnDetails().cmbStatus().setValue(selectedClinicianNote.getStatus());
    }
}
项目:openMAXIMS    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean presentingProblHaveActiveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave)
{
    ClinicianNoteDefaultTextConfigVoCollection clinicianNote = domain.listClinicianNotes(clinicianNoteToSave.getProblem(), PreActiveActiveInactiveStatus.ACTIVE);

    clinicianNote.remove(clinicianNoteToSave);

    if (clinicianNote.size() == 0)
        return false;

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControlsFromData(ClinicianNoteDefaultTextConfigVo selectedClinicianNote)
{
    clearInstanceControls();

    if (selectedClinicianNote == null)
        return;

    if (selectedClinicianNote.getDefaultClinicianNoteIsNotNull())
    {
        form.ctnDetails().qmbPresentingProblem().newRow(selectedClinicianNote.getProblem(), selectedClinicianNote.getProblem().getPCName());
        form.ctnDetails().qmbPresentingProblem().setValue(selectedClinicianNote.getProblem());
        form.ctnDetails().richNote().setValue(selectedClinicianNote.getDefaultClinicianNote());
        form.ctnDetails().cmbStatus().setValue(selectedClinicianNote.getStatus());
    }
}
项目:openmaxims-linux    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:openmaxims-linux    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openmaxims-linux    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:AvoinApotti    文件:Logic.java   
public boolean save() throws ims.framework.exceptions.PresentationLogicException
{
    ClinicianNoteDefaultTextConfigVo clinicianNoteToSave = populateDataFromScreen(form.getLocalContext().getselectedClinicianNote());

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

    // Check SOE
    if (clinicianNoteToSave.getID_ClinicianNoteDefaultTextConfigIsNotNull() && domain.isStale(clinicianNoteToSave))
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getLocalContext().setselectedClinicianNote(null);
        open();
        return false;
    }

    // check if an active ClinicianNote already exists for the selected problem
    if (PreActiveActiveInactiveStatus.ACTIVE.equals(clinicianNoteToSave.getStatus()))
    {
        if (presentingProblHaveActiveClinicianNote(clinicianNoteToSave))
        {
            engine.showMessage("An active note already exists for the selected problem.", "", MessageButtons.OK, MessageIcon.WARNING);
            return false;
        }
    }

    try
    {
        form.getLocalContext().setselectedClinicianNote(domain.saveClinicianNote(clinicianNoteToSave));
    }

    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isStatusInactive()
{
    ClinicianNoteDefaultTextConfigVo ClinicianNoteTemplate = form.getLocalContext().getselectedClinicianNote();
    return ClinicianNoteTemplate != null && ClinicianNoteTemplate.getStatusIsNotNull() && ClinicianNoteTemplate.getStatus().equals(PreActiveActiveInactiveStatus.INACTIVE);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isStatusActive()
{
    ClinicianNoteDefaultTextConfigVo ClinicianNoteTemplate = form.getLocalContext().getselectedClinicianNote();
    return ClinicianNoteTemplate != null && ClinicianNoteTemplate.getStatusIsNotNull() && ClinicianNoteTemplate.getStatus().equals(PreActiveActiveInactiveStatus.ACTIVE);
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws ims.framework.exceptions.PresentationLogicException
{
    ClinicianNoteDefaultTextConfigVo clinicianNoteToSave = populateDataFromScreen(form.getLocalContext().getselectedClinicianNote());

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

    // Check SOE
    if (clinicianNoteToSave.getID_ClinicianNoteDefaultTextConfigIsNotNull() && domain.isStale(clinicianNoteToSave))
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getLocalContext().setselectedClinicianNote(null);
        open();
        return false;
    }

    // check if an active ClinicianNote already exists for the selected problem
    if (PreActiveActiveInactiveStatus.ACTIVE.equals(clinicianNoteToSave.getStatus()))
    {
        if (presentingProblHaveActiveClinicianNote(clinicianNoteToSave))
        {
            engine.showMessage("An active note already exists for the selected problem.", "", MessageButtons.OK, MessageIcon.WARNING);
            return false;
        }
    }

    try
    {
        form.getLocalContext().setselectedClinicianNote(domain.saveClinicianNote(clinicianNoteToSave));
    }

    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}