java类ims.core.vo.PatientDiagnosisAtConsultationVoCollection的实例源码

Logic.java 文件源码 项目:AvoinApotti 阅读 18 收藏 0 点赞 0 评论 0
private boolean saveDiagnosis() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
        return false;
    }

    return true;
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:AvoinApotti 阅读 21 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection saveDiagnosis(PatientDiagnosisAtConsultationVoCollection diagnosis)   throws StaleObjectException 
{
    if(diagnosis == null)
        throw new CodingRuntimeException("Cannot save a null PatientDiagnosisAtConsultationVoCollection.");

    if(!diagnosis.isValidated())
        throw new CodingRuntimeException("PatientDiagnosisAtConsultationVoCollection is not validated.");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();

    for(PatientDiagnosisAtConsultationVo diagnose : diagnosis)
    {
        if(diagnose == null)
            continue;

        PatientDiagnosis doDiagnose = PatientDiagnosisAtConsultationVoAssembler.extractPatientDiagnosis(factory, diagnose);

        factory.save(doDiagnose);
        coll.add(PatientDiagnosisAtConsultationVoAssembler.create(doDiagnose));
    }

    return coll;
}
Logic.java 文件源码 项目:AvoinApotti 阅读 17 收藏 0 点赞 0 评论 0
private void addDiagnosis()
{
    if (domain.getHcpLiteUser() == null)
    {
        engine.showMessage("Logged in user is not a HCP.");                     
        return;
    }
    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();
    for (int i = 0; i < form.grdDiagnosis().getRows().size(); i++) 
    {
        coll.add(form.grdDiagnosis().getRows().get(i).getValue());
    }
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(coll);

    //if another Diagnosis is marked as Primary / Main then disable the checkbox in dialog
    boolean bEnable = false;
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColMain() != null)
                bEnable = true;
    }
    form.getGlobalContext().Clinical.setDisableMainCheckbox(bEnable);
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultation(null);

    engine.open(form.getForms().Clinical.DiagnosisDialog);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 14 收藏 0 点赞 0 评论 0
private boolean saveDiagnosis() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList, !Boolean.TRUE.equals(form.getLocalContext().getAddedDuringCoding()) ? form.getLocalContext().getCareContext() : null));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
        return false;
    }

    return true;
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:openMAXIMS 阅读 19 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection saveDiagnosisSequence(PatientDiagnosisAtConsultationVoCollection patDiagnosis, CodedDiagnosesForAttendanceVoCollection codedDiagnosis, CareContextRefVo careContextRef) throws StaleObjectException
{
    if (codedDiagnosis!=null && codedDiagnosis.size()>0)
    {
        saveCodedDiagnosis(codedDiagnosis);
    }

    PatientDiagnosisAtConsultationVoCollection collpatDiag = null; 

    if (patDiagnosis!=null && patDiagnosis.size()>0)
    {
        collpatDiag= saveDiagnosis(patDiagnosis, careContextRef);
    }

    return collpatDiag;
}
Logic.java 文件源码 项目:openMAXIMS 阅读 16 收藏 0 点赞 0 评论 0
private void addDiagnosis()
{
    if (domain.getHcpLiteUser() == null)
    {
        engine.showMessage("Logged in user is not a HCP.");                     
        return;
    }
    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();
    for (int i = 0; i < form.grdDiagnosis().getRows().size(); i++) 
    {
        coll.add(form.grdDiagnosis().getRows().get(i).getValue());
    }
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(coll);

    //if another Diagnosis is marked as Primary / Main then disable the checkbox in dialog
    boolean bEnable = false;
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColMain() != null)
                bEnable = true;
    }
    form.getGlobalContext().Clinical.setDisableMainCheckbox(bEnable);
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultation(null);

    engine.open(form.getForms().Clinical.DiagnosisDialog);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 16 收藏 0 点赞 0 评论 0
private boolean saveDiagnosis() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
        return false;
    }

    return true;
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:openMAXIMS 阅读 17 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection saveDiagnosis(PatientDiagnosisAtConsultationVoCollection diagnosis)   throws StaleObjectException 
{
    if(diagnosis == null)
        throw new CodingRuntimeException("Cannot save a null PatientDiagnosisAtConsultationVoCollection.");

    if(!diagnosis.isValidated())
        throw new CodingRuntimeException("PatientDiagnosisAtConsultationVoCollection is not validated.");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();

    for(PatientDiagnosisAtConsultationVo diagnose : diagnosis)
    {
        if(diagnose == null)
            continue;

        PatientDiagnosis doDiagnose = PatientDiagnosisAtConsultationVoAssembler.extractPatientDiagnosis(factory, diagnose);

        factory.save(doDiagnose);
        coll.add(PatientDiagnosisAtConsultationVoAssembler.create(doDiagnose));
    }

    return coll;
}
Logic.java 文件源码 项目:openMAXIMS 阅读 16 收藏 0 点赞 0 评论 0
private void addDiagnosis()
{
    if (domain.getHcpLiteUser() == null)
    {
        engine.showMessage("Logged in user is not a HCP.");                     
        return;
    }
    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();
    for (int i = 0; i < form.grdDiagnosis().getRows().size(); i++) 
    {
        coll.add(form.grdDiagnosis().getRows().get(i).getValue());
    }
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(coll);

    //if another Diagnosis is marked as Primary / Main then disable the checkbox in dialog
    boolean bEnable = false;
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColMain() != null)
                bEnable = true;
    }
    form.getGlobalContext().Clinical.setDisableMainCheckbox(bEnable);
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultation(null);

    engine.open(form.getForms().Clinical.DiagnosisDialog);
}
Logic.java 文件源码 项目:openmaxims-linux 阅读 16 收藏 0 点赞 0 评论 0
private boolean saveDiagnosis() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
        return false;
    }

    return true;
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:openmaxims-linux 阅读 18 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection saveDiagnosis(PatientDiagnosisAtConsultationVoCollection diagnosis)   throws StaleObjectException 
{
    if(diagnosis == null)
        throw new CodingRuntimeException("Cannot save a null PatientDiagnosisAtConsultationVoCollection.");

    if(!diagnosis.isValidated())
        throw new CodingRuntimeException("PatientDiagnosisAtConsultationVoCollection is not validated.");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();

    for(PatientDiagnosisAtConsultationVo diagnose : diagnosis)
    {
        if(diagnose == null)
            continue;

        PatientDiagnosis doDiagnose = PatientDiagnosisAtConsultationVoAssembler.extractPatientDiagnosis(factory, diagnose);

        factory.save(doDiagnose);
        coll.add(PatientDiagnosisAtConsultationVoAssembler.create(doDiagnose));
    }

    return coll;
}
Logic.java 文件源码 项目:AvoinApotti 阅读 18 收藏 0 点赞 0 评论 0
private void populatePatientDiagnosisGrid(PatientDiagnosisAtConsultationVoCollection patientDiagnosisAtConsultationVoCollection) 
{
    form.grdDiagnosis().getRows().clear();

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

    if(Boolean.TRUE.equals(form.getLocalContext().getAddedDuringCoding()))
        patientDiagnosisAtConsultationVoCollection.sort();

    for(PatientDiagnosisAtConsultationVo diagnose : patientDiagnosisAtConsultationVoCollection)
    {
        if(diagnose == null)
            continue;

        ims.emergency.forms.interventionsdiagnosisinvestigationscc.GenForm.grdDiagnosisRow row = form.grdDiagnosis().getRows().newRow();
        row.setColDiagnose(diagnose.getDiagnosisDescription());

        boolean isPrimary = isPrimary(diagnose);
        row.setBold(isPrimary);

        if(isPrimary)
        {
            row.setColImage(form.getImages().Core.Pin);
            row.setTooltipForColImage("Main Diagnosis");
            form.getLocalContext().setPrimaryDiagnosis(diagnose);//WDEV-17320
        }

        row.setValue(diagnose);
    }
}
Logic.java 文件源码 项目:AvoinApotti 阅读 17 收藏 0 点赞 0 评论 0
private void saveDiagnosisSequence() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

    for (int gridIndex = 0 ; gridIndex < form.grdDiagnosis().getRows().size() ; gridIndex++)
    {
        PatientDiagnosisAtConsultationVo diagnosisVo = (PatientDiagnosisAtConsultationVo)form.grdDiagnosis().getRows().get(gridIndex).getValue();

        diagnosisVo.setCodingSequence(gridIndex);

        diagnosisList.set(diagnosisList.indexOf(diagnosisVo), diagnosisVo);
    }

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
    }
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:AvoinApotti 阅读 25 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}
Logic.java 文件源码 项目:AvoinApotti 阅读 17 收藏 0 点赞 0 评论 0
private void updateDiagnosis()
{
    if (domain.getHcpLiteUser() == null)
    {
        engine.showMessage("Logged in user is not a HCP.");                     
        return;
    }

    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();
    for (int i = 0; i < form.grdDiagnosis().getRows().size(); i++) 
    {
        coll.add(form.grdDiagnosis().getRows().get(i).getValue());
    }
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(coll);

    //if another Diagnosis is marked as Primary / Main then disable the checkbox in dialog
    boolean bEnable = false;
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColMain() != null)
        {
            if (i != form.grdDiagnosis().getSelectedRowIndex())
                bEnable = true;
        }
    }

    form.getGlobalContext().Clinical.setDisableMainCheckbox(bEnable);
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultation(form.grdDiagnosis().getSelectedRow().getValue());

    engine.open(form.getForms().Clinical.DiagnosisDialog);
}
Logic.java 文件源码 项目:AvoinApotti 阅读 17 收藏 0 点赞 0 评论 0
private PatientDiagnosisAtConsultationVoCollection orderGridByDate(PatientDiagnosisAtConsultationVoCollection diagnosises) 
{
    Vector<PatientDiagnosisAtConsultationVo> v=new Vector<PatientDiagnosisAtConsultationVo>();
    for (int i=0;i<diagnosises.size();i++)
    {
        if (v.size()==0)
            v.add(diagnosises.get(i));
        else
        {
            PatientDiagnosisAtConsultationVo diagnosis = diagnosises.get(i);
            if (diagnosis.getAuthoringInfoIsNotNull()&&diagnosis.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
            {
                int n=v.size();
                for (int j=0;j<n;j++)
                {
                    if (v.get(j).getAuthoringInfoIsNotNull()&&v.get(j).getAuthoringInfo().getAuthoringDateTimeIsNotNull())
                    {
                        if (diagnosis.getAuthoringInfo().getAuthoringDateTime().compareTo(v.get(j).getAuthoringInfo().getAuthoringDateTime())<0)
                            v.add(j, diagnosis);
                        else
                            v.add(diagnosis);
                    }
                }
            }
        }
    }
    diagnosises.clear();
    for (int x=0;x<v.size();x++)
    {
        diagnosises.add(v.get(x));
    }
    return diagnosises;
}
DiagnosisDialogImpl.java 文件源码 项目:AvoinApotti 阅读 22 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:openMAXIMS 阅读 20 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 19 收藏 0 点赞 0 评论 0
private void updateDiagnosis()
{
    if (domain.getHcpLiteUser() == null)
    {
        engine.showMessage("Logged in user is not a HCP.");                     
        return;
    }

    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();
    for (int i = 0; i < form.grdDiagnosis().getRows().size(); i++) 
    {
        coll.add(form.grdDiagnosis().getRows().get(i).getValue());
    }
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(coll);

    //if another Diagnosis is marked as Primary / Main then disable the checkbox in dialog
    boolean bEnable = false;
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColMain() != null)
        {
            if (i != form.grdDiagnosis().getSelectedRowIndex())
                bEnable = true;
        }
    }

    form.getGlobalContext().Clinical.setDisableMainCheckbox(bEnable);
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultation(form.grdDiagnosis().getSelectedRow().getValue());

    engine.open(form.getForms().Clinical.DiagnosisDialog);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 17 收藏 0 点赞 0 评论 0
private PatientDiagnosisAtConsultationVoCollection orderGridByDate(PatientDiagnosisAtConsultationVoCollection diagnosises) 
{
    Vector<PatientDiagnosisAtConsultationVo> v=new Vector<PatientDiagnosisAtConsultationVo>();
    for (int i=0;i<diagnosises.size();i++)
    {
        if (v.size()==0)
            v.add(diagnosises.get(i));
        else
        {
            PatientDiagnosisAtConsultationVo diagnosis = diagnosises.get(i);
            if (diagnosis.getAuthoringInfoIsNotNull()&&diagnosis.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
            {
                int n=v.size();
                for (int j=0;j<n;j++)
                {
                    if (v.get(j).getAuthoringInfoIsNotNull()&&v.get(j).getAuthoringInfo().getAuthoringDateTimeIsNotNull())
                    {
                        if (diagnosis.getAuthoringInfo().getAuthoringDateTime().compareTo(v.get(j).getAuthoringInfo().getAuthoringDateTime())<0)
                            v.add(j, diagnosis);
                        else
                            v.add(diagnosis);
                    }
                }
            }
        }
    }
    diagnosises.clear();
    for (int x=0;x<v.size();x++)
    {
        diagnosises.add(v.get(x));
    }
    return diagnosises;
}
DiagnosisDialogImpl.java 文件源码 项目:openMAXIMS 阅读 21 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 16 收藏 0 点赞 0 评论 0
private void populatePatientDiagnosisGrid(PatientDiagnosisAtConsultationVoCollection patientDiagnosisAtConsultationVoCollection) 
{
    form.grdDiagnosis().getRows().clear();

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

    if(Boolean.TRUE.equals(form.getLocalContext().getAddedDuringCoding()))
        patientDiagnosisAtConsultationVoCollection.sort();

    for(PatientDiagnosisAtConsultationVo diagnose : patientDiagnosisAtConsultationVoCollection)
    {
        if(diagnose == null)
            continue;

        ims.emergency.forms.interventionsdiagnosisinvestigationscc.GenForm.grdDiagnosisRow row = form.grdDiagnosis().getRows().newRow();
        row.setColDiagnose(diagnose.getDiagnosisDescription());

        boolean isPrimary = isPrimary(diagnose);
        row.setBold(isPrimary);

        if(isPrimary)
        {
            row.setColImage(form.getImages().Core.Pin);
            row.setTooltipForColImage("Main Diagnosis");
            form.getLocalContext().setPrimaryDiagnosis(diagnose);//WDEV-17320
        }

        row.setValue(diagnose);
    }
}
Logic.java 文件源码 项目:openMAXIMS 阅读 29 收藏 0 点赞 0 评论 0
private void saveDiagnosisSequence() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

    for (int gridIndex = 0 ; gridIndex < form.grdDiagnosis().getRows().size() ; gridIndex++)
    {
        PatientDiagnosisAtConsultationVo diagnosisVo = (PatientDiagnosisAtConsultationVo)form.grdDiagnosis().getRows().get(gridIndex).getValue();

        diagnosisVo.setCodingSequence(gridIndex);

        diagnosisList.set(diagnosisList.indexOf(diagnosisVo), diagnosisVo);
    }

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
    }
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:openMAXIMS 阅读 22 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 16 收藏 0 点赞 0 评论 0
private void updateDiagnosis()
{
    if (domain.getHcpLiteUser() == null)
    {
        engine.showMessage("Logged in user is not a HCP.");                     
        return;
    }

    PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection();
    for (int i = 0; i < form.grdDiagnosis().getRows().size(); i++) 
    {
        coll.add(form.grdDiagnosis().getRows().get(i).getValue());
    }
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(coll);

    //if another Diagnosis is marked as Primary / Main then disable the checkbox in dialog
    boolean bEnable = false;
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColMain() != null)
        {
            if (i != form.grdDiagnosis().getSelectedRowIndex())
                bEnable = true;
        }
    }

    form.getGlobalContext().Clinical.setDisableMainCheckbox(bEnable);
    form.getGlobalContext().Core.setPatientDiagnosisAtConsultation(form.grdDiagnosis().getSelectedRow().getValue());

    engine.open(form.getForms().Clinical.DiagnosisDialog);
}
Logic.java 文件源码 项目:openMAXIMS 阅读 42 收藏 0 点赞 0 评论 0
private PatientDiagnosisAtConsultationVoCollection orderGridByDate(PatientDiagnosisAtConsultationVoCollection diagnosises) 
{
    Vector<PatientDiagnosisAtConsultationVo> v=new Vector<PatientDiagnosisAtConsultationVo>();
    for (int i=0;i<diagnosises.size();i++)
    {
        if (v.size()==0)
            v.add(diagnosises.get(i));
        else
        {
            PatientDiagnosisAtConsultationVo diagnosis = diagnosises.get(i);
            if (diagnosis.getAuthoringInfoIsNotNull()&&diagnosis.getAuthoringInfo().getAuthoringDateTimeIsNotNull())
            {
                int n=v.size();
                for (int j=0;j<n;j++)
                {
                    if (v.get(j).getAuthoringInfoIsNotNull()&&v.get(j).getAuthoringInfo().getAuthoringDateTimeIsNotNull())
                    {
                        if (diagnosis.getAuthoringInfo().getAuthoringDateTime().compareTo(v.get(j).getAuthoringInfo().getAuthoringDateTime())<0)
                            v.add(j, diagnosis);
                        else
                            v.add(diagnosis);
                    }
                }
            }
        }
    }
    diagnosises.clear();
    for (int x=0;x<v.size();x++)
    {
        diagnosises.add(v.get(x));
    }
    return diagnosises;
}
DiagnosisDialogImpl.java 文件源码 项目:openMAXIMS 阅读 22 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}
Logic.java 文件源码 项目:openmaxims-linux 阅读 18 收藏 0 点赞 0 评论 0
private void populatePatientDiagnosisGrid(PatientDiagnosisAtConsultationVoCollection patientDiagnosisAtConsultationVoCollection) 
{
    form.grdDiagnosis().getRows().clear();

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

    if(Boolean.TRUE.equals(form.getLocalContext().getAddedDuringCoding()))
        patientDiagnosisAtConsultationVoCollection.sort();

    for(PatientDiagnosisAtConsultationVo diagnose : patientDiagnosisAtConsultationVoCollection)
    {
        if(diagnose == null)
            continue;

        ims.emergency.forms.interventionsdiagnosisinvestigationscc.GenForm.grdDiagnosisRow row = form.grdDiagnosis().getRows().newRow();
        row.setColDiagnose(diagnose.getDiagnosisDescription());

        boolean isPrimary = isPrimary(diagnose);
        row.setBold(isPrimary);

        if(isPrimary)
        {
            row.setColImage(form.getImages().Core.Pin);
            row.setTooltipForColImage("Main Diagnosis");
            form.getLocalContext().setPrimaryDiagnosis(diagnose);//WDEV-17320
        }

        row.setValue(diagnose);
    }
}
Logic.java 文件源码 项目:openmaxims-linux 阅读 16 收藏 0 点赞 0 评论 0
private void saveDiagnosisSequence() 
{
    PatientDiagnosisAtConsultationVoCollection diagnosisList = form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList();

    for (int gridIndex = 0 ; gridIndex < form.grdDiagnosis().getRows().size() ; gridIndex++)
    {
        PatientDiagnosisAtConsultationVo diagnosisVo = (PatientDiagnosisAtConsultationVo)form.grdDiagnosis().getRows().get(gridIndex).getValue();

        diagnosisVo.setCodingSequence(gridIndex);

        diagnosisList.set(diagnosisList.indexOf(diagnosisVo), diagnosisVo);
    }

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

    try 
    {
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.saveDiagnosis(diagnosisList));
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getGlobalContext().Core.setPatientDiagnosisAtConsultationList(domain.listPatientDiagnosis(form.getLocalContext().getCareContext()));
        populatePatientDiagnosisGrid(form.getGlobalContext().Core.getPatientDiagnosisAtConsultationList());
    }
}
InterventionsDiagnosisInvestigationsCcImpl.java 文件源码 项目:openmaxims-linux 阅读 29 收藏 0 点赞 0 评论 0
public PatientDiagnosisAtConsultationVoCollection listPatientDiagnosis(CareContextRefVo attendance) 
{
    if(attendance == null || attendance.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select pd from PatientDiagnosis as pd left join pd.careContext as cc where cc.id = :AttendenceId order by UPPER(pd.diagnosisDescription) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {attendance.getID_CareContext()});

    return PatientDiagnosisAtConsultationVoAssembler.createPatientDiagnosisAtConsultationVoCollectionFromPatientDiagnosis(list);
}


问题


面经


文章

微信
公众号

扫码关注公众号