Java 类ims.clinical.vo.OutpatientNotesOutcomeVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void open()
{
    form.setMode(FormMode.VIEW);
    clearScreen();

    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = domain.getLastOutpatientNotesOutcome(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedItem(voOutpatientNotesOutcome);

    if(voOutpatientNotesOutcome == null)
    {
        form.btnNew().setVisible(true);
        form.btnUpdate().setVisible(false);
    }
    else
    {
        form.btnNew().setVisible(false);
        form.btnUpdate().setVisible(true);

        displayRecord(voOutpatientNotesOutcome);
    }

    //WDEV-1236
    checkReturnToForm();

    updateButtonsStatus();
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    form.setMode(FormMode.VIEW);
    clearScreen();

    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = domain.getLastOutpatientNotesOutcome(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedItem(voOutpatientNotesOutcome);

    if(voOutpatientNotesOutcome == null)
    {
        form.btnNew().setVisible(true);
        form.btnUpdate().setVisible(false);
    }
    else
    {
        form.btnNew().setVisible(false);
        form.btnUpdate().setVisible(true);

        displayRecord(voOutpatientNotesOutcome);
    }

    //WDEV-1236
    checkReturnToForm();

    updateButtonsStatus();
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    form.setMode(FormMode.VIEW);
    clearScreen();

    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = domain.getLastOutpatientNotesOutcome(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedItem(voOutpatientNotesOutcome);

    if(voOutpatientNotesOutcome == null)
    {
        form.btnNew().setVisible(true);
        form.btnUpdate().setVisible(false);
    }
    else
    {
        form.btnNew().setVisible(false);
        form.btnUpdate().setVisible(true);

        displayRecord(voOutpatientNotesOutcome);
    }

    //WDEV-1236
    checkReturnToForm();

    updateButtonsStatus();
}
项目:openmaxims-linux    文件:Logic.java   
private void open()
{
    form.setMode(FormMode.VIEW);
    clearScreen();

    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = domain.getLastOutpatientNotesOutcome(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedItem(voOutpatientNotesOutcome);

    if(voOutpatientNotesOutcome == null)
    {
        form.btnNew().setVisible(true);
        form.btnUpdate().setVisible(false);
    }
    else
    {
        form.btnNew().setVisible(false);
        form.btnUpdate().setVisible(true);

        displayRecord(voOutpatientNotesOutcome);
    }

    //WDEV-1236
    checkReturnToForm();

    updateButtonsStatus();
}
项目:AvoinApotti    文件:Logic.java   
private void displayRecord(OutpatientNotesOutcomeVo voOutpatientNotesOutcome)
{
    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull() 
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull()
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() )
    {
        AuthoringInformationVo voAuthoring = new AuthoringInformationVo();
        voAuthoring.setAuthoringDateTime(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringDateTime());

        if(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull())
            voAuthoring.setAuthoringHcp(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp());

        //wdev-12315
        form.customControlAuthoringInfo().setValue(voAuthoring);
        //--------
    }

    form.richTextInstructions().setValue(voOutpatientNotesOutcome.getInstructionNextClinic());

    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull())
    {
        form.richTextObjective().setValue(voOutpatientNotesOutcome.getClinicalNote().getObjectiveNote());
        form.richTextPlan().setValue(voOutpatientNotesOutcome.getClinicalNote().getPlanNote());
    }

    form.cmbFollowUp().setValue(voOutpatientNotesOutcome.getOutcome());
    form.cmbReview().setValue(voOutpatientNotesOutcome.getReviewinUnits());
    form.intReview().setValue(voOutpatientNotesOutcome.getReviewIn());
}
项目:AvoinApotti    文件:Logic.java   
private boolean isNewRecord()
{
    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = form.getLocalContext().getSelectedItem();
    return ((voOutpatientNotesOutcome == null || voOutpatientNotesOutcome.getID_OutpatientNotesOutcome() == null) || 
           (voOutpatientNotesOutcome != null && voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp() == null));
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForClinicalContact(ClinicalContactRefVo clinicalContact) 
{
    if(clinicalContact == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.clinicalContact.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {clinicalContact.getID_ClinicalContact()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesOutcomeForClinicalNote(ClinicalNotesRefVo clinnoteRefVo) 
{
    DomainFactory factory = getDomainFactory();
    if(clinnoteRefVo != null)
    {
        StringBuffer hql = new StringBuffer(" from OutpatientNotesOutcome opnote where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " opnote.clinicalNote.clinicalNote.id = :refid");
            markers.add("refid");
        values.add(clinnoteRefVo.getID_ClinicalNotes());
        andStr = " and ";   

        List listNotes = factory.find(hql.toString(), markers,values);
        if(listNotes != null && listNotes.size() > 0)
        { 
            OutpatientNotesOutcomeVoCollection voColl = OutpatientNotesOutcomeVoAssembler.createOutpatientNotesOutcomeVoCollectionFromOutpatientNotesOutcome(listNotes);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }

    return null;
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {careContextRef.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:AvoinApotti    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo getLastOutpatientNotesOutcome(CareContextRefVo careContext)
{
    if(careContext == null)
        throw new CodingRuntimeException("null careContext passed to getLastOutpatientNotesOutcome() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CONTEXTID order by o1_1.id asc ",
            new String[] {"CONTEXTID"}, 
            new Object[] {careContext.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:AvoinApotti    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo saveOutpatientNotesOutcome(OutpatientNotesOutcomeVo record) throws StaleObjectException, UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("null record passed to saveClinicalCorrespondence() !");

    if(!record.isValidated())
        throw new CodingRuntimeException("OutpatientNotesOutcome not validated !");

    DomainFactory factory = getDomainFactory();
    OutpatientNotesOutcome boOutpatientNotesOutcome = OutpatientNotesOutcomeVoAssembler.extractOutpatientNotesOutcome(factory, record);     
    factory.save(boOutpatientNotesOutcome);

    return OutpatientNotesOutcomeVoAssembler.create(boOutpatientNotesOutcome);
}
项目:openMAXIMS    文件:Logic.java   
private void displayRecord(OutpatientNotesOutcomeVo voOutpatientNotesOutcome)
{
    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull() 
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull()
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() )
    {
        AuthoringInformationVo voAuthoring = new AuthoringInformationVo();
        voAuthoring.setAuthoringDateTime(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringDateTime());

        if(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull())
            voAuthoring.setAuthoringHcp(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp());

        //wdev-12315
        form.customControlAuthoringInfo().setValue(voAuthoring);
        //--------
    }

    form.richTextInstructions().setValue(voOutpatientNotesOutcome.getInstructionNextClinic());

    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull())
    {
        form.richTextObjective().setValue(voOutpatientNotesOutcome.getClinicalNote().getObjectiveNote());
        form.richTextPlan().setValue(voOutpatientNotesOutcome.getClinicalNote().getPlanNote());
    }

    form.cmbFollowUp().setValue(voOutpatientNotesOutcome.getOutcome());
    form.cmbReview().setValue(voOutpatientNotesOutcome.getReviewinUnits());
    form.intReview().setValue(voOutpatientNotesOutcome.getReviewIn());
}
项目:openMAXIMS    文件:Logic.java   
private boolean isNewRecord()
{
    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = form.getLocalContext().getSelectedItem();
    return ((voOutpatientNotesOutcome == null || voOutpatientNotesOutcome.getID_OutpatientNotesOutcome() == null) || 
           (voOutpatientNotesOutcome != null && voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp() == null));
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForClinicalContact(ClinicalContactRefVo clinicalContact) 
{
    if(clinicalContact == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.clinicalContact.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {clinicalContact.getID_ClinicalContact()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesOutcomeForClinicalNote(ClinicalNotesRefVo clinnoteRefVo) 
{
    DomainFactory factory = getDomainFactory();
    if(clinnoteRefVo != null)
    {
        StringBuffer hql = new StringBuffer(" from OutpatientNotesOutcome opnote where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " opnote.clinicalNote.clinicalNote.id = :refid");
            markers.add("refid");
        values.add(clinnoteRefVo.getID_ClinicalNotes());
        andStr = " and ";   

        List listNotes = factory.find(hql.toString(), markers,values);
        if(listNotes != null && listNotes.size() > 0)
        { 
            OutpatientNotesOutcomeVoCollection voColl = OutpatientNotesOutcomeVoAssembler.createOutpatientNotesOutcomeVoCollectionFromOutpatientNotesOutcome(listNotes);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }

    return null;
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {careContextRef.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openMAXIMS    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo getLastOutpatientNotesOutcome(CareContextRefVo careContext)
{
    if(careContext == null)
        throw new CodingRuntimeException("null careContext passed to getLastOutpatientNotesOutcome() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CONTEXTID order by o1_1.id asc ",
            new String[] {"CONTEXTID"}, 
            new Object[] {careContext.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openMAXIMS    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo saveOutpatientNotesOutcome(OutpatientNotesOutcomeVo record) throws StaleObjectException, UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("null record passed to saveClinicalCorrespondence() !");

    if(!record.isValidated())
        throw new CodingRuntimeException("OutpatientNotesOutcome not validated !");

    DomainFactory factory = getDomainFactory();
    OutpatientNotesOutcome boOutpatientNotesOutcome = OutpatientNotesOutcomeVoAssembler.extractOutpatientNotesOutcome(factory, record);     
    factory.save(boOutpatientNotesOutcome);

    return OutpatientNotesOutcomeVoAssembler.create(boOutpatientNotesOutcome);
}
项目:openMAXIMS    文件:Logic.java   
private void displayRecord(OutpatientNotesOutcomeVo voOutpatientNotesOutcome)
{
    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull() 
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull()
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() )
    {
        AuthoringInformationVo voAuthoring = new AuthoringInformationVo();
        voAuthoring.setAuthoringDateTime(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringDateTime());

        if(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull())
            voAuthoring.setAuthoringHcp(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp());

        //wdev-12315
        form.customControlAuthoringInfo().setValue(voAuthoring);
        //--------
    }

    form.richTextInstructions().setValue(voOutpatientNotesOutcome.getInstructionNextClinic());

    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull())
    {
        form.richTextObjective().setValue(voOutpatientNotesOutcome.getClinicalNote().getObjectiveNote());
        form.richTextPlan().setValue(voOutpatientNotesOutcome.getClinicalNote().getPlanNote());
    }

    form.cmbFollowUp().setValue(voOutpatientNotesOutcome.getOutcome());
    form.cmbReview().setValue(voOutpatientNotesOutcome.getReviewinUnits());
    form.intReview().setValue(voOutpatientNotesOutcome.getReviewIn());
}
项目:openMAXIMS    文件:Logic.java   
private boolean isNewRecord()
{
    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = form.getLocalContext().getSelectedItem();
    return ((voOutpatientNotesOutcome == null || voOutpatientNotesOutcome.getID_OutpatientNotesOutcome() == null) || 
           (voOutpatientNotesOutcome != null && voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp() == null));
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForClinicalContact(ClinicalContactRefVo clinicalContact) 
{
    if(clinicalContact == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.clinicalContact.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {clinicalContact.getID_ClinicalContact()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesOutcomeForClinicalNote(ClinicalNotesRefVo clinnoteRefVo) 
{
    DomainFactory factory = getDomainFactory();
    if(clinnoteRefVo != null)
    {
        StringBuffer hql = new StringBuffer(" from OutpatientNotesOutcome opnote where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " opnote.clinicalNote.clinicalNote.id = :refid");
            markers.add("refid");
        values.add(clinnoteRefVo.getID_ClinicalNotes());
        andStr = " and ";   

        List listNotes = factory.find(hql.toString(), markers,values);
        if(listNotes != null && listNotes.size() > 0)
        { 
            OutpatientNotesOutcomeVoCollection voColl = OutpatientNotesOutcomeVoAssembler.createOutpatientNotesOutcomeVoCollectionFromOutpatientNotesOutcome(listNotes);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }

    return null;
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {careContextRef.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openMAXIMS    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo getLastOutpatientNotesOutcome(CareContextRefVo careContext)
{
    if(careContext == null)
        throw new CodingRuntimeException("null careContext passed to getLastOutpatientNotesOutcome() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CONTEXTID order by o1_1.id asc ",
            new String[] {"CONTEXTID"}, 
            new Object[] {careContext.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openMAXIMS    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo saveOutpatientNotesOutcome(OutpatientNotesOutcomeVo record) throws StaleObjectException, UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("null record passed to saveClinicalCorrespondence() !");

    if(!record.isValidated())
        throw new CodingRuntimeException("OutpatientNotesOutcome not validated !");

    DomainFactory factory = getDomainFactory();
    OutpatientNotesOutcome boOutpatientNotesOutcome = OutpatientNotesOutcomeVoAssembler.extractOutpatientNotesOutcome(factory, record);     
    factory.save(boOutpatientNotesOutcome);

    return OutpatientNotesOutcomeVoAssembler.create(boOutpatientNotesOutcome);
}
项目:openmaxims-linux    文件:Logic.java   
private void displayRecord(OutpatientNotesOutcomeVo voOutpatientNotesOutcome)
{
    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull() 
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull()
        && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() )
    {
        AuthoringInformationVo voAuthoring = new AuthoringInformationVo();
        voAuthoring.setAuthoringDateTime(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringDateTime());

        if(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull())
            voAuthoring.setAuthoringHcp(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp());

        //wdev-12315
        form.customControlAuthoringInfo().setValue(voAuthoring);
        //--------
    }

    form.richTextInstructions().setValue(voOutpatientNotesOutcome.getInstructionNextClinic());

    if(voOutpatientNotesOutcome.getClinicalNoteIsNotNull())
    {
        form.richTextObjective().setValue(voOutpatientNotesOutcome.getClinicalNote().getObjectiveNote());
        form.richTextPlan().setValue(voOutpatientNotesOutcome.getClinicalNote().getPlanNote());
    }

    form.cmbFollowUp().setValue(voOutpatientNotesOutcome.getOutcome());
    form.cmbReview().setValue(voOutpatientNotesOutcome.getReviewinUnits());
    form.intReview().setValue(voOutpatientNotesOutcome.getReviewIn());
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isNewRecord()
{
    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = form.getLocalContext().getSelectedItem();
    return ((voOutpatientNotesOutcome == null || voOutpatientNotesOutcome.getID_OutpatientNotesOutcome() == null) || 
           (voOutpatientNotesOutcome != null && voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() && 
            voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo().getAuthoringHcp() == null));
}
项目:openmaxims-linux    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForClinicalContact(ClinicalContactRefVo clinicalContact) 
{
    if(clinicalContact == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.clinicalContact.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {clinicalContact.getID_ClinicalContact()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openmaxims-linux    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesOutcomeForClinicalNote(ClinicalNotesRefVo clinnoteRefVo) 
{
    DomainFactory factory = getDomainFactory();
    if(clinnoteRefVo != null)
    {
        StringBuffer hql = new StringBuffer(" from OutpatientNotesOutcome opnote where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " opnote.clinicalNote.clinicalNote.id = :refid");
            markers.add("refid");
        values.add(clinnoteRefVo.getID_ClinicalNotes());
        andStr = " and ";   

        List listNotes = factory.find(hql.toString(), markers,values);
        if(listNotes != null && listNotes.size() > 0)
        { 
            OutpatientNotesOutcomeVoCollection voColl = OutpatientNotesOutcomeVoAssembler.createOutpatientNotesOutcomeVoCollectionFromOutpatientNotesOutcome(listNotes);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }

    return null;
}
项目:openmaxims-linux    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo getOutpatientNotesForCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null)
        throw new CodingRuntimeException("null clinical contact passed to getOutpatientNotesForClinicalContact() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CCID order by o1_1.id asc ",
            new String[] {"CCID"}, 
            new Object[] {careContextRef.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openmaxims-linux    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo getLastOutpatientNotesOutcome(CareContextRefVo careContext)
{
    if(careContext == null)
        throw new CodingRuntimeException("null careContext passed to getLastOutpatientNotesOutcome() !");

    DomainFactory factory = getDomainFactory();

    List list = factory.find("from OutpatientNotesOutcome as o1_1 where o1_1.careContext.id = :CONTEXTID order by o1_1.id asc ",
            new String[] {"CONTEXTID"}, 
            new Object[] {careContext.getID_CareContext()});

    return list.size() == 0 ? null : OutpatientNotesOutcomeVoAssembler.create((OutpatientNotesOutcome)list.get(0));
}
项目:openmaxims-linux    文件:OutPatientsTreatmentPlanImpl.java   
public OutpatientNotesOutcomeVo saveOutpatientNotesOutcome(OutpatientNotesOutcomeVo record) throws StaleObjectException, UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("null record passed to saveClinicalCorrespondence() !");

    if(!record.isValidated())
        throw new CodingRuntimeException("OutpatientNotesOutcome not validated !");

    DomainFactory factory = getDomainFactory();
    OutpatientNotesOutcome boOutpatientNotesOutcome = OutpatientNotesOutcomeVoAssembler.extractOutpatientNotesOutcome(factory, record);     
    factory.save(boOutpatientNotesOutcome);

    return OutpatientNotesOutcomeVoAssembler.create(boOutpatientNotesOutcome);
}
项目:AvoinApotti    文件:Logic.java   
protected void onlyrDetailsTabChanged(LayerBridge tab)
{
    if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue())
    {
        form.lyrDetails().tabPreview().htmReport().setHTML("");

        if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null)
        {
            buildReport();
            form.getLocalContext().setReportChanged(Boolean.FALSE);
        }
    }  //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. 
    else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded())
    {
        form.lyrDetails().tabServices().dyngrdMedication().clear();

        MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo();

        voFilter.setType(MedicationSnapShot.DISCHARGE);
        voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort());

        MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter);

        if (voOverView != null && voOverView.getMedicationIsNotNull())
        {
            //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page 
            MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child);            
            gridPopulation.initializeGrid();
            gridPopulation.populate(voOverView);

            form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE);
        }
    }
    else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT))
    {
        if(form.getLocalContext().getSelectedItem() == null)
        {
            OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact());

            if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3)
            {
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic());

                form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome());
                form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn());
                form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits());

                form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void fillSummaryGrid()
{
    form.lyrTabs().tabDetails().grdSummary().getRows().clear();

    // Check for OutPatientCliicalNotes
    OutpatientNotesOutcomeVo voOutpatientNotesOutcome = null;
    if (!returnContextType())
    {
        if (form.getLocalContext().getCurrentOPNote() == null)
            voOutpatientNotesOutcome = domain.getOutpatientNotesForCareContext(form.getGlobalContext().Core.getCurrentCareContext());//WDEV-19027
    }

    GenForm.lyrTabsLayer.tabDetailsContainer.grdSummaryRow rowSummary = null;
    if (form.getLocalContext().getCurrentOPNote() != null || voOutpatientNotesOutcome != null)
    {
        rowSummary = form.lyrTabs().tabDetails().grdSummary().getRows().newRow();
        rowSummary.setSummaryDetail("Out-patient Clinical note recorded.");
    }

    if (returnContextType())
    {
        // Check For IP ClinicalNotes
        ClinicalNotesVo voClinicalNote = domain.getClinicalNotesForCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        if (voClinicalNote != null)
        {
            rowSummary = form.lyrTabs().tabDetails().grdSummary().getRows().newRow();
            rowSummary.setSummaryDetail("In-patient Clinical note recorded.");
        }
    }

    // Check For a Graphical Assessment
    PatientAssessmentVo patientAssessmentVo = domain.getPatientAssessmentForCareContext(form.getGlobalContext().Core.getCurrentCareContext());  //WDEV-19027
    if (patientAssessmentVo != null)
    {
        rowSummary = form.lyrTabs().tabDetails().grdSummary().getRows().newRow();
        rowSummary.setSummaryDetail("Graphical annotation recorded.");
    }

    // Check for an Assessment
    PatientUserDefinedObjectListVoCollection voColl = domain.listPatientUserDefinedObjectsForCareContext(form.getGlobalContext().Core.getCurrentCareContext());  //WDEV-19027
    if (voColl != null && voColl.size() > 0)
    {
        rowSummary = form.lyrTabs().tabDetails().grdSummary().getRows().newRow();
        rowSummary.setSummaryDetail("Assessment recorded.");
    }
}
项目:AvoinApotti    文件:Logic.java   
private void displayOPNoteRecord(OutpatientNotesOutcomeVo voOutpatientNotesOutcome)
{
    if (voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull())
    {
        form.lyrTabs().tabOPDNote().customControlOPAuthoring().setValue(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfoIsNotNull() ? voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getAuthoringInfo() : null);

        if (voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getIsTranscribedIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getIsTranscribed().booleanValue())
        {
            form.lyrTabs().tabOPDNote().dtimTransDTOP().setValue(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getSystemInfo().getCreationDateTime());
            form.lyrTabs().tabOPDNote().qmbTransByOP().newRow(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getSystemInfo().getCreationUser(), voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getSystemInfo().getCreationUser());
            form.lyrTabs().tabOPDNote().qmbTransByOP().setValue(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getSystemInfo().getCreationUser());

            showHideOPTranscribedControls(true);
        }
    }

    form.lyrTabs().tabOPDNote().richTextInstructions().setValue(voOutpatientNotesOutcome.getInstructionNextClinic());

    if (voOutpatientNotesOutcome.getClinicalNoteIsNotNull())
    {
        form.lyrTabs().tabOPDNote().richTextObjective().setValue(voOutpatientNotesOutcome.getClinicalNote().getObjectiveNote());
        form.lyrTabs().tabOPDNote().richTextPlan().setValue(voOutpatientNotesOutcome.getClinicalNote().getPlanNote());

        fillOPStatusCombo(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote());
        if (form.lyrTabs().tabOPDNote().cmbStatusOP().getValues().size() == 0)
            form.lyrTabs().tabOPDNote().cmbStatusOP().newRow(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getCurrentStatus().getStatus(), voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getCurrentStatus().getStatus().getText());

        form.lyrTabs().tabOPDNote().cmbStatusOP().setValue(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getCurrentStatusIsNotNull() ? voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getCurrentStatus().getStatus() : null);
    }

    if (voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getForReviewIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getForReview().booleanValue())
    {
        form.lyrTabs().tabOPDNote().chkForReviewOP().setValue(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getForReview().booleanValue());
        form.lyrTabs().tabOPDNote().cmbDisciplineOP().setValue(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getForReviewDiscipline());

        form.lyrTabs().tabOPDNote().chkForReviewOP().setVisible(true);
        form.lyrTabs().tabOPDNote().cmbDisciplineOP().setVisible(true);
        form.lyrTabs().tabOPDNote().lblDisciplineOP().setVisible(true);
        form.lyrTabs().tabOPDNote().setcustomControlReviewedOPVisible(false);
        form.lyrTabs().tabOPDNote().chkMarkAsReviewedOP().setVisible(false);

        if (voOutpatientNotesOutcome.getClinicalNoteIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNoteIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getReviewingHCPIsNotNull() && voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getReviewingDateTimeIsNotNull())
        {
            AuthoringInformationVo voReview = new AuthoringInformationVo();
            voReview.setAuthoringDateTime(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getReviewingDateTime());
            voReview.setAuthoringHcp(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().getReviewingHCP());
            form.lyrTabs().tabOPDNote().customControlReviewedOP().setValue(voReview);

            form.lyrTabs().tabOPDNote().chkForReviewOP().setVisible(false);
            form.lyrTabs().tabOPDNote().cmbDisciplineOP().setVisible(false);
            form.lyrTabs().tabOPDNote().lblDisciplineOP().setVisible(false);
            form.lyrTabs().tabOPDNote().setcustomControlReviewedOPVisible(true);
            form.lyrTabs().tabOPDNote().customControlReviewedOP().setLabels(AuthoringLabelType.REVIEWING);
            form.lyrTabs().tabOPDNote().chkMarkAsReviewedOP().setVisible(true);
            form.lyrTabs().tabOPDNote().chkMarkAsReviewedOP().setValue(true);
        }
    }

    form.lyrTabs().tabOPDNote().cmbFollowUp().setValue(voOutpatientNotesOutcome.getOutcome());
    form.lyrTabs().tabOPDNote().cmbReview().setValue(voOutpatientNotesOutcome.getReviewinUnits());
    form.lyrTabs().tabOPDNote().intReview().setValue(voOutpatientNotesOutcome.getReviewIn());
}
项目:AvoinApotti    文件:Logic.java   
private boolean populateDataFromScreen(OutpatientNotesOutcomeVo voOutpatientNotesOutcome)
{
    if(form.customControlAuthoringInfo().getValue() == null || form.customControlAuthoringInfo().getValue().getAuthoringHcp() == null || form.customControlAuthoringInfo().getValue().getAuthoringDateTime() == null) //wdev-12315
    {
        engine.showMessage("The Authoring HCP and Authoring Date/Time are mandatory !");    //wdev-12315
        return false;
    }

    if(voOutpatientNotesOutcome.getClinicalNote() == null)
        voOutpatientNotesOutcome.setClinicalNote(new SoapNoteVo());

    if(voOutpatientNotesOutcome.getClinicalNote().getClinicalNote() == null)
        voOutpatientNotesOutcome.getClinicalNote().setClinicalNote(new ClinicalNotesVo());

    AuthoringInformationVo voAuthor = new AuthoringInformationVo();
    voAuthor.setAuthoringDateTime(form.customControlAuthoringInfo().getValue().getAuthoringDateTime());
    voAuthor.setAuthoringHcp(form.customControlAuthoringInfo().getValue().getAuthoringHcp());
    voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().setAuthoringInfo(voAuthor);

    voOutpatientNotesOutcome.getClinicalNote().setAuthoringInformation(form.customControlAuthoringInfo().getValue());

    if ( (voOutpatientNotesOutcome.getClinicalNote().getCareContext() == null) && (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()))
        voOutpatientNotesOutcome.getClinicalNote().setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    voOutpatientNotesOutcome.setInstructionNextClinic(form.richTextInstructions().getValue());
    voOutpatientNotesOutcome.getClinicalNote().setObjectiveNote(form.richTextObjective().getValue());
    voOutpatientNotesOutcome.getClinicalNote().setPlanNote(form.richTextPlan().getValue());

    voOutpatientNotesOutcome.setOutcome(form.cmbFollowUp().getValue());
    voOutpatientNotesOutcome.setReviewinUnits(form.cmbReview().getValue());
    voOutpatientNotesOutcome.setReviewIn(form.intReview().getValue());

    voOutpatientNotesOutcome.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    voOutpatientNotesOutcome.getClinicalNote().setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().setCareContext(form.getGlobalContext().Core.getCurrentCareContext());      
    voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().setIsDerivedNote(Boolean.TRUE);

    StringBuffer sb = new StringBuffer();
    sb.append("<b>Objective Note</b><br>");
    sb.append(form.richTextObjective().getValue());
    sb.append("<br><br><b>Plan Note</b><br>");
    sb.append(form.richTextPlan().getValue());
    voOutpatientNotesOutcome.getClinicalNote().getClinicalNote().setClinicalNote(sb.toString());

    return true;
}
项目:AvoinApotti    文件:DocumentGenerationImpl.java   
public OutpatientNotesOutcomeVo getOPDSummary(ClinicalContactRefVo clinicalContactRefVo)
{
    ClinicalNoteDrawing intf = (ClinicalNoteDrawing) getDomainImpl(ClinicalNoteDrawingImpl.class);
    return intf.getOutpatientNotesForClinicalContact(clinicalContactRefVo);
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo saveOutpatientNotesOutcome(OutpatientNotesOutcomeVo record) throws StaleObjectException 
{
    if(record == null)
        throw new CodingRuntimeException("null record passed to saveClinicalCorrespondence() !");

    if(!record.isValidated())
        throw new CodingRuntimeException("OutpatientNotesOutcome not validated !");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("select p from ClinicalNotes p left join p.noteType as l1_1");
    if(record.getClinicalNote().getClinicalNote().getID_ClinicalNotes()== null)
    {
        hql.append(" where (p.clinicalContact.id = " + record.getClinicalNote().getClinicalNote().getClinicalContact().getID_ClinicalContact() + 
                        "and l1_1.id <> -882 and l1_1 <> -883)"); 
                        // clinicalNote.noteType != ( SUMARIONADMISION(-882) and DISCHARGENOTE(-883)) 
    }
    else
    {
        hql.append(" where (p.clinicalContact.id = " + record.getClinicalNote().getClinicalNote().getClinicalContact().getID_ClinicalContact() + 
                        "and l1_1.id <> -882 and l1_1 <> -883 and p.id <> " +  record.getClinicalNote().getClinicalNote().getID_ClinicalNotes() +")");
                        //clinicalNote.noteType != ( SUMARIONADMISION(-882) and DISCHARGENOTE(-883))
    }

    List list = (factory.find(hql.toString()));

    if(list.size() > 0)
    {

        ClinicalNotesVoCollection doClinNotes = ClinicalNotesVoAssembler.createClinicalNotesVoCollectionFromClinicalNotes(list);
        if (doClinNotes.get(0).getSourceOfNote() != null &&
                !(doClinNotes.get(0).getSourceOfNote().getId() == (getDomLookup(SourceOfNote.CLINICALCLINICALNOTE).getId())))
        {
            return null;
        }
        else
        {
            throw new DomainRuntimeException("A record exists for this clinical contact, the screen will be refreshed");    
        }
    }

    OutpatientNotesOutcome boOutpatientNotesOutcome = OutpatientNotesOutcomeVoAssembler.extractOutpatientNotesOutcome(factory, record);
    CareContext doCareContext = getCurrentCareContext(record.getCareContext());//WDEV-19027
    boOutpatientNotesOutcome.setCareContext(doCareContext);//WDEV-19027

    factory.save(boOutpatientNotesOutcome);

    return OutpatientNotesOutcomeVoAssembler.create(boOutpatientNotesOutcome);
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public OutpatientNotesOutcomeVo saveOutpatientNotesOutcomePerCareContext(OutpatientNotesOutcomeVo record) throws StaleObjectException
{
    if(record == null)
        throw new CodingRuntimeException("null record passed to saveClinicalCorrespondence() !");

    if(!record.isValidated())
        throw new CodingRuntimeException("OutpatientNotesOutcome not validated !");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("select p from ClinicalNotes p left join p.noteType as l1_1");
    if(record.getClinicalNote().getClinicalNote().getID_ClinicalNotes()== null)
    {
        hql.append(" where (p.careContext.id = " + record.getClinicalNote().getClinicalNote().getCareContext().getID_CareContext() + 
                        "and l1_1.id <> -882 and l1_1 <> -883)"); 
                        // clinicalNote.noteType != ( SUMARIONADMISION(-882) and DISCHARGENOTE(-883)) 
    }
    else
    {
        hql.append(" where (p.careContext.id = " + record.getClinicalNote().getClinicalNote().getCareContext().getID_CareContext() + 
                        "and l1_1.id <> -882 and l1_1 <> -883 and p.id <> " +  record.getClinicalNote().getClinicalNote().getID_ClinicalNotes() +")");
                        //clinicalNote.noteType != ( SUMARIONADMISION(-882) and DISCHARGENOTE(-883))
    }

    List list = (factory.find(hql.toString()));

    if(list.size() > 0)
    {

        ClinicalNotesVoCollection doClinNotes = ClinicalNotesVoAssembler.createClinicalNotesVoCollectionFromClinicalNotes(list);
        if (doClinNotes.get(0).getSourceOfNote() != null &&
                !(doClinNotes.get(0).getSourceOfNote().getId() == (getDomLookup(SourceOfNote.CLINICALCLINICALNOTE).getId())))
        {
            return null;
        }
        else
        {
            throw new DomainRuntimeException("A record exists for this Care context, the screen will be refreshed");    
        }
    }

    OutpatientNotesOutcome boOutpatientNotesOutcome = OutpatientNotesOutcomeVoAssembler.extractOutpatientNotesOutcome(factory, record);
    CareContext doCareContext = getCurrentCareContext(record.getCareContext());//WDEV-19027
    boOutpatientNotesOutcome.setCareContext(doCareContext);//WDEV-19027

    factory.save(boOutpatientNotesOutcome);

    return OutpatientNotesOutcomeVoAssembler.create(boOutpatientNotesOutcome);
}
项目:openMAXIMS    文件:Logic.java   
protected void onlyrDetailsTabChanged(LayerBridge tab)
{
    if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue())
    {
        form.lyrDetails().tabPreview().htmReport().setHTML("");

        if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null)
        {
            buildReport();
            form.getLocalContext().setReportChanged(Boolean.FALSE);
        }
    }  //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. 
    else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded())
    {
        form.lyrDetails().tabServices().dyngrdMedication().clear();

        MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo();

        voFilter.setType(MedicationSnapShot.DISCHARGE);
        voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort());

        MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter);

        if (voOverView != null && voOverView.getMedicationIsNotNull())
        {
            //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page 
            MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child);            
            gridPopulation.initializeGrid();
            gridPopulation.populate(voOverView);

            form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE);
        }
    }
    else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT))
    {
        if(form.getLocalContext().getSelectedItem() == null)
        {
            OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact());

            if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3)
            {
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic());

                form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome());
                form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn());
                form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits());

                form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE);
            }
        }
    }
}