Java 类ims.core.vo.CareContextShortVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void loadCareContextRecords(NeuroMotorFindingsShortVoCollection voNeuroMotorFindingsColl)
{
    CareContextShortVo voCareContext = form.getGlobalContext().Core.getCurrentCareContext();

    if (form.getGlobalContext().Core.getCurrentClinicalContact() == null)
    {
        form.recNeuro().newRow(voCareContext, "Care Context:    " + voCareContext.getStartDateTime() + " - " + voCareContext.getEpisodeOfCare().getResponsibleHCP(), Color.Green);
        loadCareContextMotorRecords(voNeuroMotorFindingsColl, Color.Green);
        form.recNeuro().setValue(voCareContext);
    }
    else
    {
        form.recNeuro().newRow(voCareContext, "Care Context:    " + voCareContext.getStartDateTime() + " - " + voCareContext.getEpisodeOfCare().getResponsibleHCP());
        loadCareContextMotorRecords(voNeuroMotorFindingsColl, null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialize(){
    form.setMode(FormMode.VIEW);

    PatientShort voPatShort = form.getGlobalContext().Core.getPatientShort();
    if (voPatShort == null)
        try {
            throw new FormOpenException("Error: Patient not selected.");
        } catch (FormOpenException e) {
            e.printStackTrace();
        }

    CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
    form.getLocalContext().setSelectedCareContextShort(currentCareContext);

    if(currentCareContext!=null)
        form.getLocalContext().setCurrentCareContextId(currentCareContext.getID_CareContext());

    loadLookupsIntoGrid();

}
项目:AvoinApotti    文件:Logic.java   
private CareContextShortVoCollection addCurrentContextToCollection(Integer currentCareContextId, CareContextShortVoCollection collCareContextShort) {
    boolean bRecordExistsForCurrent = false;
    for(int i=0; i<collCareContextShort.size(); i++){
        CareContextShortVo voCareContextShort =  collCareContextShort.get(i); 
        if(voCareContextShort.getID_CareContext().equals(currentCareContextId)){
            bRecordExistsForCurrent = true;
        }
    }

    if(!bRecordExistsForCurrent){
        collCareContextShort.add(form.getGlobalContext().Core.getCurrentCareContext());
        collCareContextShort.sort(SortOrder.DESCENDING);
    }

    return collCareContextShort;        
}
项目:AvoinApotti    文件:Logic.java   
private void checkRecordIsEditable(OPDSpasticityAssessTreatVo voOpdSpastAssessTreat, CareContextShortVo voCareContextShort)
{
    Integer currentCareContextId = form.getLocalContext().getCurrentCareContextId();

    if(voOpdSpastAssessTreat!=null){
        form.btnNew().setVisible(false);

        if(voCareContextShort.getID_CareContext().equals(currentCareContextId))
            form.btnUpdate().setVisible(true);
        else
            form.btnUpdate().setVisible(false);
    }
    else{

        form.getLocalContext().setvoOpdSpastAssessTreat(null);

        if(voCareContextShort.getID_CareContext().equals(currentCareContextId))
            form.btnNew().setVisible(true);
        else
            form.btnNew().setVisible(false);

        form.btnUpdate().setVisible(false);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadCareContextRecords(NeuroSensationFindingsShortVoCollection voSensationFindingsColl)
{
    CareContextShortVo voCareContext = form.getGlobalContext().Core.getCurrentCareContext();

    if(form.getGlobalContext().Core.getCurrentClinicalContact() == null)
    {
        form.recbrSensation().newRow(voCareContext, "Care Context:    " + voCareContext.getStartDateTime() + " - " + voCareContext.getEpisodeOfCare().getResponsibleHCP(), Color.Green);
        loadCareContextMotorRecords(voSensationFindingsColl, Color.Green);
        form.recbrSensation().setValue(voCareContext);
    }
    else
    {
        form.recbrSensation().newRow(voCareContext, "Care Context:    " + voCareContext.getStartDateTime() + " - " + voCareContext.getEpisodeOfCare().getResponsibleHCP());
        loadCareContextMotorRecords(voSensationFindingsColl, null);
    } 
}
项目:AvoinApotti    文件:Logic.java   
private void loadCareContextRecords(NeuroReflexesShortVoCollection voNeuroReflexesColl)
{
    CareContextShortVo voCareContext = form.getGlobalContext().Core.getCurrentCareContext();

    if(form.getGlobalContext().Core.getCurrentClinicalContact() == null)
    {
        form.recbrReflexes().newRow(voCareContext, "Care Context:    " + voCareContext.getStartDateTime() + " - " + voCareContext.getEpisodeOfCare().getResponsibleHCP(), Color.Green);
        loadCareContextMotorRecords(voNeuroReflexesColl, Color.Green);
        form.recbrReflexes().setValue(voCareContext);
    }
    else
    {
        form.recbrReflexes().newRow(voCareContext, "Care Context:    " + voCareContext.getStartDateTime() + " - " + voCareContext.getEpisodeOfCare().getResponsibleHCP());
        loadCareContextMotorRecords(voNeuroReflexesColl, null);
    } 
}
项目:AvoinApotti    文件:Logic.java   
private void setUpdatedHeader()
{
    if(form.recbrPathology().getValue() != null)
    {
        if ((form.recbrPathology().getValue() instanceof CareContextVo))
        {
            CareContextVo voCareContext = (CareContextVo) form.recbrPathology().getValue();
            form.getLocalContext().setUpdatedInstance(voCareContext);
        }
        else if (form.recbrPathology().getValue() instanceof CareContextShortVo) //WDEV-15081
        {
            CareContextShortVo voCareContextShort = (CareContextShortVo) form.recbrPathology().getValue();
            form.getLocalContext().setUpdatedInstance(voCareContextShort);
        }
        else
        {
            ClinicalContactShortVo voClinicalContact  = (ClinicalContactShortVo) form.recbrPathology().getValue();
            form.getLocalContext().setUpdatedInstance(voClinicalContact);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadCareContextJointRecords(CareContextShortVo voCareContext, MskBoneJointShortVoCollection voBoneJointShortColl, Color activeColor)
{
    // loads the CareContext Joint Bones records
    if (voBoneJointShortColl != null)
    {
        for (int i = 0; i < voBoneJointShortColl.size(); i++)
        {
            MskBoneJointShortVo voBoneJointShort = voBoneJointShortColl.get(i);
            if (voBoneJointShort.getClinicalContact() == null && voBoneJointShort.getCareContext().getID_CareContext().equals(voCareContext.getID_CareContext()))
            {
                if (voBoneJointShort.getAuthoringDateTimeIsNotNull())
                    form.recbrJointBone().newRow(voBoneJointShort, "\t\t\t\t " + voBoneJointShort.getAuthoringDateTime() + " - " + voBoneJointShort.getAuthoringCP().getMos().getName(), activeColor);
            }
        }
        sortBoneJointColl(voCareContext, voBoneJointShortColl);
    }
}
项目:AvoinApotti    文件:VTERiskAssessmentImpl.java   
public CareContextShortVo getCareContextByPasEventId(PASEventRefVo pasEventRef) 
{
    if(pasEventRef == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List carecontexts = factory.find("select c1_1 from CareContext as c1_1 left join c1_1.pasEvent as p1_1 where    p1_1.id =:idPasEvent   ", new String[] {"idPasEvent"}, new Object[] {pasEventRef.getID_PASEvent()});


    if( carecontexts != null && carecontexts.size() > 0)
    {
        CareContextShortVoCollection tempColl = CareContextShortVoAssembler.createCareContextShortVoCollectionFromCareContext(carecontexts).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }


    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void fillRecordBrowser()
{
    form.recbrOPDMedicalNotes().clear();

    OPDGenNotesShortVoCollection voGenNotesColl = domain.listOPDGenNotesByEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    voGenNotesColl = isCareContextPresent(voGenNotesColl);
    if(voGenNotesColl != null)
    {
        for(int i=0; i< voGenNotesColl.size(); i++)
        {
            OPDGenNotesShortVo voOPDGenNotes = voGenNotesColl.get(i);
            CareContextShortVo voCareContext = voOPDGenNotes.getCareContext();
            loadCareContextDetails(voCareContext);
        }
    }

    browseRecord();
}
项目:AvoinApotti    文件:Logic.java   
private void checkRecordIsEditable()
{       
    if(form.recbrOPDMedicalNotes().getValue() != null)
    {
        if(form.recbrOPDMedicalNotes().getValue() instanceof CareContextShortVo)
        {
            CareContextShortVo voCurrentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
            CareContextShortVo voSelectedCareContext = (CareContextShortVo) form.recbrOPDMedicalNotes().getValue();
            if(voSelectedCareContext.getID_CareContext().equals(voCurrentCareContext.getID_CareContext()))
            {
                activateButtons(true);
                showButtons();
            }
            else
                activateButtons(false);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void fillRecordBrowser()
{
    form.recbrOPDEDClinicNotes().clear();

    Integer currentCareContextId = form.getLocalContext().getCurrentCareContextId();

    CareContextShortVoCollection collCareContextShortVo = domain.listOPEDCareContextsByEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    collCareContextShortVo = addCurrentContextToCollection(currentCareContextId, collCareContextShortVo);
    for (int i = 0; i < collCareContextShortVo.size(); i++)
    {
        CareContextShortVo voCareContextShort = collCareContextShortVo.get(i);
        if (voCareContextShort.getID_CareContext().equals(currentCareContextId))
        {
            form.recbrOPDEDClinicNotes().newRow(voCareContextShort, voCareContextShort.getRecordBrowserText(), Color.Green);
        }
        else
            form.recbrOPDEDClinicNotes().newRow(voCareContextShort, voCareContextShort.getRecordBrowserText());
    }

}
项目:AvoinApotti    文件:Logic.java   
private void browseRecord()
{
    updateBrowseInformation();
    if (form.recbrOPDEDClinicNotes().getValue() != null)
    {
        CareContextShortVo voCareContextShort = (CareContextShortVo) form.recbrOPDEDClinicNotes().getValue();

        OPDErectDysfxnVoCollection coll = domain.getOPDErectDysfxnByCareContext((CareContextLiteVo) form.recbrOPDEDClinicNotes().getValue());
        OPDErectDysfxnVo voOPDErectDysfxnVo = null;
        if(coll!=null && coll.size()>0)
            voOPDErectDysfxnVo = coll.get(0);
        form.getLocalContext().setvoOPDErectDysfxn(voOPDErectDysfxnVo);
        form.getLocalContext().setMedSocialHistory(domain.getMedSocialHistoryByCareContext((CareContextLiteVo) form.recbrOPDEDClinicNotes().getValue()));

        populateScreenFromData();

        populateSocialHistoryScreenFromData();

        checkRecordIsEditable(voOPDErectDysfxnVo, voCareContextShort);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateSummaryInformation()
{       
    CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
    if(currentCareContext == null)
        return;

    if(currentCareContext.getStartDateTimeIsNotNull() && currentCareContext.getStartDateTime().getDate() != null)
        form.dteCurrentAdmissionDate().setValue(currentCareContext.getStartDateTime().getDate());

    AdmisSummary summary = domain.getAdmissionSummary(currentCareContext);
    if(summary != null)
    {
        form.txtClassification1().setValue(summary.getOverallNeuro());
        form.txtClassification1().setValue(summary.getCompleteIncomplete());

        if(summary.getDateOfInjuryIsNotNull())
            form.txtDateOfInjury().setValue(summary.getDateOfInjury().toString());

        form.txtCause().setValue(summary.getCauseOfInjury());           
        form.dteFirstAdmission().setValue(summary.getFirstAdmissionDate());

        if(summary.getMRSAStatusIsNotNull())
            form.ansMRSAStatus().setValue(summary.getMRSAStatus().booleanValue() ? YesNoUnknown.YES : YesNoUnknown.NO);             
    }   
}
项目:AvoinApotti    文件:NurAssessmentComponentImpl.java   
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
    DomainFactory factory = getDomainFactory();

    String hql = "select asmntComp " +
            " from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
            " where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
            " and asmntComp.componentType = :compType"+ 
            " and asmntComp.isRIE is null"+
            " order by asmntComp.id desc";

    java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
    if ( components != null && ! components.isEmpty()) 
    {
        ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
        AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
        copyComp.setAssessmentInfo(null);
        copyComp.setID_AssessmentComponent(null);
        return (copyComp);              
    }

    return null;    
}
项目:AvoinApotti    文件:SharedNewConcernImpl.java   
public MedicalProbOnAdmisVoCollection listProbsOnAdmission(CareContextShortVo voClinicalContactShort)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from PatientProblem medicalProbOnAdmis "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(voClinicalContactShort != null)
    {
        condStr.append(andStr + " medicalProbOnAdmis.careContext.id = :id_CareContext"); 
        markers.add("id_CareContext");
        values.add(voClinicalContactShort.getID_CareContext());
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    return MedicalProbOnAdmisVoAssembler.createMedicalProbOnAdmisVoCollectionFromPatientProblem(factory.find(hql, markers, values));
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to populate the Care Contexts (with stool scale assessments) to record browser 
 */
private void populateCareContextRecords(CareContextShortVoCollection careContextList)
{
    // Clear CareContext list for record browser
    form.recbrAssessment().clear();

    // Terminate function if careContext collection is null
    if (careContextList == null || careContextList.size() == 0)
        return;

    for (int i = 0; i < careContextList.size(); i++)
    {
        CareContextShortVo careContext = careContextList.get(i);

        // Skip null care contexts records
        if (careContext == null)
            continue;

        if (careContext.equals(form.getGlobalContext().Core.getCurrentCareContext()))
            form.recbrAssessment().newRow(careContext, "<Currently selected Care Context> " + careContext.getStartDateTime().getDate().toString() + " " + careContext.getStartDateTime().getTime().toString());
        else
            form.recbrAssessment().newRow(careContext, careContext.getStartDateTime().getDate().toString() + " " + careContext.getStartDateTime().getTime().toString());
    }
}
项目:AvoinApotti    文件:PatientMovementImpl.java   
/**
 * Retrieves a list of PatientHandling Objects on root contact short id
 */
public PatientHandlingHeaderCollection listPatientHandling(CareContextShortVo careContextShortVo)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientMovementHandlingScreening pmhs ";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();
    String andStr = " ";

    if (careContextShortVo != null)
    {
        hql.append(andStr + " pmhs.careContext.id = :rcc");
        markers.add("rcc");
        values.add(careContextShortVo.getID_CareContext());
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List patHandlingScreening = factory.find(query, markers, values);

    return (PatientHandlingHeaderAssembler.createPatientHandlingHeaderCollectionFromPatientMovementHandlingScreening(patHandlingScreening).sort(SortOrder.DESCENDING));
}
项目:AvoinApotti    文件:PatientMovementImpl.java   
/**
 * Retrieves a list of PatientMovement Objects on root contact short id
 */
public PatientMovementHeaderCollection listPatientMovement(CareContextShortVo careContextShortVo)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientMovementHandling pmh ";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();
    String andStr = " ";

    if (careContextShortVo != null)
    {
        hql.append(andStr + " pmh.careContext.id = :rcc");
        markers.add("rcc");
        values.add(careContextShortVo.getID_CareContext());
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List patMovementHandling = factory.find(query, markers, values);

    return (PatientMovementHeaderAssembler.createPatientMovementHeaderCollectionFromPatientMovementHandling(patMovementHandling).sort(SortOrder.DESCENDING));
}
项目:AvoinApotti    文件:Logic.java   
private void isRecordEditable()
{
    if(form.recbrEnvironment().getValue()!= null)
    {
        if(form.recbrEnvironment().getValue() instanceof ClinicalContactShortVo && form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
                && form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact().equals(((ClinicalContactRefVo) form.recbrEnvironment().getValue()).getID_ClinicalContact()))
        {
            displayButtonsForRecord();
        }
        else if((form.recbrEnvironment().getValue() instanceof CareContextShortVo || form.recbrEnvironment().getValue() instanceof EnvironmentalVisitShortVo) && form.getGlobalContext().Core.getCurrentClinicalContact() == null)
        {
            //If the current Care Context is selected then there is always an option of many environment records.
            displayButtonsForRecord();
            form.btnNew().setVisible(true);
            form.btnNew().setEnabled(true);
        }
        else
            hideButtons();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateRecordBrowser(CareContextShortVo currentCareContext)
{
    form.recbrSurgAudit().clear();

    SurgicalAuditOperationDetailVoCollection collSurgAudit = domain.listSurgicalAuditOperationDetailByCareContext(currentCareContext);

    for (int i = 0; i < collSurgAudit.size(); i++)
    {
        SurgicalAuditOperationDetailVo surgAudit = collSurgAudit.get(i);
        addRowToRecordBrowser(surgAudit);
    }

    if (form.getLocalContext().getselectedSurgicalAuditOpDetailIsNotNull())
    {
        form.recbrSurgAudit().setValue(form.getLocalContext().getselectedSurgicalAuditOpDetail());
    }

    form.getLocalContext().setselectedSurgicalAuditOpDetail(form.recbrSurgAudit().getValue());

}
项目:AvoinApotti    文件:Logic.java   
private void checkRecordIsEditableForUpdate()
{
    if(form.recbrOPDInvestigations().getValue() != null)
    {
        if(form.recbrOPDInvestigations().getValue() instanceof CareContextShortVo)
        {
            CareContextShortVo voCurrentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
            CareContextShortVo voSelectedCareContext = (CareContextShortVo) form.recbrOPDInvestigations().getValue();
            if(voSelectedCareContext.getID_CareContext().equals(voCurrentCareContext.getID_CareContext()))
            {
                form.btnUpdate().setVisible(true);
                form.btnUpdate().setEnabled(true);
            }
            else
            {
                form.btnUpdate().setVisible(false);
                form.btnUpdate().setEnabled(false);
            }
        }
    }
}
项目:AvoinApotti    文件:DischargeInpatientImpl.java   
public CareContextShortVo updateCareContextWithEndDateTime(CareContextRefVo careContext, DateTime endDateTime) throws StaleObjectException
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("careContext parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");

    if(endDateTime == null)
        throw new CodingRuntimeException("endDateTime parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");


    DomainFactory factory = getDomainFactory();

    CareContext doCareContext = (CareContext) factory.getDomainObject(careContext);

    if(endDateTime != null)
        doCareContext.setEndDateTime(endDateTime.getJavaDate());
    //if(doCareContext.getEpisodeOfCare() != null && endDateTime != null)
        //doCareContext.getEpisodeOfCare().setEndDate(endDateTime.getJavaDate());

    factory.save(doCareContext);
    return CareContextShortVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:DischargeInpatientImpl.java   
public CareContextShortVo updateCareContextAndEpisodeOfCareWithEndDateTime(CareContextRefVo careContext, DateTime endDateTime) throws StaleObjectException
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("careContext parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");

    if(endDateTime == null)
        throw new CodingRuntimeException("endDateTime parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");


    DomainFactory factory = getDomainFactory();

    CareContext doCareContext = (CareContext) factory.getDomainObject(careContext);

    if(endDateTime != null)
        doCareContext.setEndDateTime(endDateTime.getJavaDate());
    if(doCareContext.getEpisodeOfCare() != null && endDateTime != null)
        doCareContext.getEpisodeOfCare().setEndDate(endDateTime.getJavaDate());

    factory.save(doCareContext);
    return CareContextShortVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:Logic.java   
private String getContextInformation(CareContextShortVo careContext, ClinicalContactShortVo clinicalContact)
{
    String infoText = "";

    if (careContext != null)
    {
        infoText += "Care Context: " + careContext.toString();
    }
    else
    {
        infoText += "No Care Context";
    }

    if (clinicalContact == null)
    {
        infoText += "<br>No Clinical Contact.";
    }
    else
    {
        infoText += "<br>Clinical Contact: " + clinicalContact.toString();
    }
    return infoText;
}
项目:AvoinApotti    文件:DemoReferralListImpl.java   
public CareContextShortVo getCareContext(CareContextRefVo voRef)
{
    if(voRef == null || voRef.getID_CareContext() == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }

    DomainFactory factory = getDomainFactory();
    CareContext domainRecord = (CareContext)factory.
        getDomainObject(CareContext.class, voRef.getID_CareContext().intValue());

    return CareContextShortVoAssembler.create(domainRecord);    
}
项目:AvoinApotti    文件:Logic.java   
private void loadCurrentCareContext()
{
    CareContextShortVo voCurrentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
        form.recbrContact().newRow(voCurrentCareContext, voCurrentCareContext.getRecordBrowserText());
    else
        form.recbrContact().newRow(voCurrentCareContext, voCurrentCareContext.getRecordBrowserText(), Color.Green);

}
项目:AvoinApotti    文件:Logic.java   
private void isRecordEditable() 
{
    if(form.recbrStrengthProg().getValue() != null)
    {
        if(form.recbrStrengthProg().getValue() instanceof ClinicalContactShortVo)
        {
            ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrStrengthProg().getValue();
            ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

            if(voCurrentClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
            {
                hideButtons(true);
                if(form.getLocalContext().getStrengtheningProgramVoIsNotNull())
                {                   
                    form.btnUpdate().setVisible(true);
                    form.btnNew().setVisible(false);
                }
                else
                {
                    form.btnUpdate().setVisible(false);
                    form.btnNew().setVisible(true);
                }
            }
            else
                hideButtons(false);
        }

        if(form.recbrStrengthProg().getValue()instanceof CareContextShortVo)
            hideButtons(false);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData()
{
    PatientShort patient = form.getGlobalContext().Core.getPatientShort();
    CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();
    SurgicalAuditOperationDetailVo surgicalAudit = form.getLocalContext().getselectedSurgicalAuditOpDetail();

    form.lyrSurgAudit().tabPreOperationChecks().ccPreOpChecks().initialize(surgicalAudit);
    form.lyrSurgAudit().tabPreOperationChecksTheatreNurse().ccPreOpChecksTheatreNurse().initialize(patient, careContext, surgicalAudit);
    form.lyrSurgAudit().tabProcedureDetails().ccProcedureDetails().initialize(patient, careContext, surgicalAudit);
    form.lyrSurgAudit().tabPlannedActualProcedures().ccPlannedActualProc().initialize(patient, careContext, surgicalAudit);
    form.lyrSurgAudit().tabRecovery().ccRecovery().initialize(surgicalAudit);
}
项目:AvoinApotti    文件:Logic.java   
private void loadCareContextIntoRecordBrowser(CareContextShortVo voCareContextShort, Color activeColor)
{
    //loads the CareContext records
    if(voCareContextShort != null)
    {
        form.recbrOPDMedExam().newRow(voCareContextShort, voCareContextShort.getRecordBrowserText(), activeColor); //      "Care Context: " + voCareContextShort.getStartDateTime() + " - " + voCareContextShort.getEpisodeOfCare().getResponsibleHCP() + " Contact Type: " + voCareContextShort.getContext(), activeColor);
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
//WDEV-16673
protected void onlyrEmergencyAttendanceTabChanged(LayerBridge tab)
{
    if (FormMode.VIEW.equals(form.getMode()))
    {
        grdPreviousHistoryRow selectedRow = form.grdPreviousHistory().getSelectedRow();

        if (selectedRow != null && selectedRow.getValue() != null && selectedRow.getValue() instanceof AttendanceDetailsVo)
        {
            form.getGlobalContext().Core.setCurrentCareContext(selectedRow.getValue()!=null ? ((AttendanceDetailsVo) selectedRow.getValue()).getCareContext():null);
            form.getGlobalContext().Emergency.setCurrentEmergencyAttendance(domain.getAttendanceDetails((AttendanceDetailsVo) selectedRow.getValue()));

            AttendanceDetailsVo selectedAttendance = form.getGlobalContext().Emergency.getCurrentEmergencyAttendance();
            CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();
            EpisodeofCareLiteVo episodeOfCare = careContext.getEpisodeOfCare();
            PatientShort patient = form.getGlobalContext().Core.getPatientShort();

            if (tab.equals(form.lyrEmergencyAttendance().tabAttDet()))
            {
                form.lyrEmergencyAttendance().tabAttDet().ccAttendanceDetails().setValue(selectedRow.getValue());
            }
            else if (tab.equals(form.lyrEmergencyAttendance().tabChart()) && selectedRow.getValue() instanceof AttendanceDetailsVo)
            {
                form.lyrEmergencyAttendance().tabChart().ccChatRequested().initialize(selectedAttendance, patient, careContext, episodeOfCare);
                form.lyrEmergencyAttendance().tabChart().ccChatRequested().setValue(domain.getChartRequestedByEmergencyAttendance(selectedAttendance));

            }
            else if (tab.equals(form.lyrEmergencyAttendance().tabInvoices()) && selectedRow.getValue() instanceof AttendanceDetailsVo)
            {
                form.lyrEmergencyAttendance().tabInvoices().ccInvoicesBilling().initialize(selectedAttendance, patient, episodeOfCare, careContext);
                form.lyrEmergencyAttendance().tabInvoices().ccInvoicesBilling().setValue(domain.getAttendanceBillingByEmergencyAttendance(selectedAttendance));

            }
        }   
    }
    updateControlState();   
}
项目:AvoinApotti    文件:Logic.java   
private void fillRecordBrowser(HydrotherapyShortVoCollection voHydroColl)
{
    form.recbrHydro().clear();
    boolean selectedClinicalContactFound = false;
    CareContextShortVo voSelectedCareContext = form.getGlobalContext().Core.getCurrentCareContext();
    ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    form.recbrHydro().newRow(voSelectedCareContext, voSelectedCareContext.getRecordBrowserText());

    if(voHydroColl != null)
    {
        for(int i = 0 ; i < voHydroColl.size() ; i++)
        {
            ClinicalContactShortVo voClinicalContact = voHydroColl.get(i).getClinicalContact();
            if(voSelectedClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voSelectedClinicalContact.getID_ClinicalContact()))
            {
                selectedClinicalContactFound = true;
                form.recbrHydro().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString(), Color.Green);
                form.recbrHydro().setValue(voClinicalContact);
            }
            else
            {
                form.recbrHydro().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString());
            }
        }
    }

    if(!selectedClinicalContactFound && voSelectedClinicalContact != null)
    {
        form.recbrHydro().newRow(voSelectedClinicalContact, "\t\t\t\tClinical Contact: " + voSelectedClinicalContact.getStartDateTime().toString() + " - " + voSelectedClinicalContact.getSeenBy().toString(), Color.Green);
        form.recbrHydro().setValue(voSelectedClinicalContact);
    }
    browseRecord();
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdDischargeDetailsRowSelectionChanged(
        DynamicGridRow row) 
{       
    if (row != null &&
            row.getIdentifier() != null &&
                row.getIdentifier() instanceof PatientShort &&
                    row.getValue() != null &&
                        row.getValue() instanceof DischargeDetailsVo)
    {
        form.getGlobalContext().Core.setPatientShort((PatientShort) row.getIdentifier());

        CareContextRefVo careContextRefVo = ((DischargeDetailsVo) row.getValue()).getCareContextIsNotNull() ? ((DischargeDetailsVo) row.getValue()).getCareContext() : null;
        if (careContextRefVo != null)
        {
            CareContextShortVo careContextShortVo = domain.getCareContextShort(careContextRefVo);
            if (careContextShortVo != null)
            {
                form.getGlobalContext().Core.setCurrentCareContext(careContextShortVo);
                form.getContextMenus().Clinical.getEDischargeListViewItem().setVisible(true);
                resetPIDBarText(); //WDEV-14654
            }               
        }           
    }
    else
    {
        clearSelectedPatient();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void checkRecordIsEditable()
{
    if(form.recbrPathology().getValue() != null)
    {
        if(form.recbrPathology().getValue() instanceof CareContextShortVo)
        {
            CareContextShortVo voCurrentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
            CareContextShortVo voSelectedCareContext = (CareContextShortVo) form.recbrPathology().getValue();
            if(voSelectedCareContext.getID_CareContext().equals(voCurrentCareContext.getID_CareContext()) && form.getGlobalContext().Core.getCurrentClinicalContact() == null)
                activateButtons(true);
            else
                activateButtons(false);

        }
        else
        {
            ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
            ClinicalContactShortVo voSelectedClinicalContact = (ClinicalContactShortVo) form.recbrPathology().getValue();
            if(voCurrentClinicalContact != null)
            {
                if(voSelectedClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
                    activateButtons(true);
                else
                    activateButtons(false);
            }
            else
                activateButtons(false);
        }
    }
    isRecordOfTypeMedicalAdmission();
}
项目:AvoinApotti    文件:Logic.java   
public void updateControlsState()
{

    if (form.getLocalContext().getIsMedicalInpatientForm())
    {
        form.btnNew().setVisible(form.getMode().equals(FormMode.VIEW) && (!form.getLocalContext().getIsClinicalContactType()));
        form.btnNew().setEnabled(form.getMode().equals(FormMode.VIEW) && (!form.getLocalContext().getIsClinicalContactType()) && (form.getLocalContext().getSelectedFindings() == null || form.recNeuro().getValue() != null && (form.recNeuro().getValue() instanceof CareContextShortVo || form.recNeuro().getValue() instanceof NeuroMotorFindingsShortVo && ((NeuroMotorFindingsShortVo) form.recNeuro().getValue()).getClinicalContact() == null)));

        form.btnUpdate().setVisible(form.getMode().equals(FormMode.VIEW) && !(form.getLocalContext().getIsClinicalContactType()) && form.getLocalContext().getSelectedFindings() != null);
        form.btnUpdate().setEnabled(form.getMode().equals(FormMode.VIEW) && (!form.getLocalContext().getIsClinicalContactType()) && form.recNeuro().getValue() != null);
    }
    else
    {
        form.btnNew().setVisible(form.getMode().equals(FormMode.VIEW) && !(!(form.getLocalContext().getIsClinicalContactType()) && form.getLocalContext().getSelectedFindings() == null));
        form.btnNew().setEnabled(form.getMode().equals(FormMode.VIEW) && form.getLocalContext().getIsClinicalContactType() && form.getLocalContext().getSelectedFindings() == null);

        form.btnUpdate().setVisible(form.getMode().equals(FormMode.VIEW) && form.getLocalContext().getSelectedFindings() != null);
        form.btnUpdate().setEnabled(form.getMode().equals(FormMode.VIEW) && form.getLocalContext().getIsClinicalContactType());
    }

    form.recNeuro().setEnabled(form.getMode().equals(FormMode.VIEW));

    // WDEV-15126
    form.ccAuthoring().setEnabledAuthoringHCP(form.getMode().equals(FormMode.EDIT));
    form.ccAuthoring().setEnabledDateTime(form.getMode().equals(FormMode.EDIT));
    form.ccAuthoring().setIsRequiredPropertyToControls(form.getMode().equals(FormMode.EDIT));

}
项目:AvoinApotti    文件:Logic.java   
private void sortBoneJointColl(CareContextShortVo voCareContext, MskBoneJointShortVoCollection voBoneJointShortColl)
{
    if (voBoneJointShortColl != null)
    {
        int x = 0;
        for (x = 0; x < voBoneJointShortColl.size(); x++)
        {
            MskBoneJointShortVoCollection voBoneJointCollForClinicalContact = new MskBoneJointShortVoCollection();
            if (voBoneJointShortColl.get(x).getClinicalContact() != null && voCareContext.getID_CareContext().equals(voBoneJointShortColl.get(x).getCareContext().getID_CareContext()))
            {
                ClinicalContactShortVo voClinicalContact = voBoneJointShortColl.get(x).getClinicalContact();

                for (int i = 0; i < voBoneJointShortColl.size(); i++)
                {
                    if (voBoneJointShortColl.get(i).getClinicalContact() != null)
                    {
                        if (voBoneJointShortColl.get(i).getClinicalContact().getID_ClinicalContact().equals(voClinicalContact.getID_ClinicalContact()))
                        {
                            voBoneJointCollForClinicalContact.add(voBoneJointShortColl.get(i));
                            x = i;
                        }
                    }
                }
                loadClinicalContactBoneJointRecords(voClinicalContact);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private String buildReport()
{       
    CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
    Object[] obj = null;
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());
    String url = "";

    Integer reportID = 163;
    obj = domain.getSystemReportAndTemplate(reportID);
    client.addSeed(new SeedValue("CARE_CONTEXT",  currentCareContext.getID_CareContext(), Integer.class));

    if(obj == null || obj.length < 2)
    {
        engine.showMessage("I could not get the report and template !");
        return "";
    }

    if(obj[0] == null || obj[1] == null)
    {
        engine.showMessage("The report has not been deployed !");
        return "";
    }

    try
    {
        url = client.buildReportAsUrlInlineFrame((String)obj[0], (String)obj[1], urlReportServer, "PDF", "", 1);
        if (url != null)
        {
            return url;
        }
    }
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return "";
    }

    return "";
}
项目:AvoinApotti    文件:EDDecisionToAdmitDialogImpl.java   
public CareContextShortVo getCareContextShort(CareContextRefVo careContextRef) 
{
    if( careContextRef == null || careContextRef.getID_CareContext() == null)
        throw new CodingRuntimeException("Cannot get Care Context record for a null CareContextRefVo");
    return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext()));

}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public CareContextShortVo getCareContext(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("Cannot get CC for a null Id.");

    return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
项目:AvoinApotti    文件:Logic.java   
private boolean loadCareContextDetails(CareContextShortVo voCareContext)
{
    if(voCareContext.getID_CareContext().equals(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext()))
    {
        form.recbrOPDMedicalNotes().newRow(voCareContext, voCareContext.getRecordBrowserText(), Color.Green);
        form.recbrOPDMedicalNotes().setValue(voCareContext);
        return true;
    }
    else
    {
        form.recbrOPDMedicalNotes().newRow(voCareContext, voCareContext.getRecordBrowserText());
    }
    return false;
}