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

项目:AvoinApotti    文件:Logic.java   
private void populateItemFromRow(PatientProcedureVo item, grdProceduresRow childRow)
{
    if(item == null)
        return;

    item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    item.setProcDate(childRow.getcolOnset());
    item.setProcedure((ProcedureLiteVo) childRow.getValue());
    item.setNotes(childRow.getcolNotes());
    item.setProcedureDescription(childRow.getcolNotes());
    item.setSpecialty((Specialty) childRow.getParentRow().getValue());
    item.setInfoSource(SourceofInformation.CLINICALCONTACT);
    item.setProcedureStatus(PatientProcedureStatus.PERFORMED);

    if(item.getAuthoringInformation() == null)
    {
        item.setAuthoringInformation(getAuthoringInfo());
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureApptDetailVo populatePatientProcedureFromScreen(ProcedureLiteVo procedure, Boolean isPrimary, CatsReferralForClinicalNotesVo referral)
{
    if(procedure == null)
        return null;

    PatientProcedureApptDetailVo patientProcedure = new PatientProcedureApptDetailVo();
    patientProcedure.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures());

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(procedure.getProcedureName());
    patientProcedure.setInfoSource(SourceofInformation.CLINICALCONTACT);
    patientProcedure.setAuthoringInformation(form.ccAuthoringInfo().getValue());
    patientProcedure.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare());
    patientProcedure.setCareContext(referral.getCareContext());
    patientProcedure.setProcDate(form.pdtPerformed().getValue());
    patientProcedure.setProcedureStatus(OutcomeEnumeration.rdoComplete.equals(form.Outcome().getValue()) ? PatientProcedureStatus.PERFORMED : PatientProcedureStatus.INCOMPLETE);
    patientProcedure.setIncompleteReason(OutcomeEnumeration.rdoIncomplete.equals(form.Outcome().getValue()) ? form.cmbReason().getValue() : null);
    patientProcedure.setIsPrimaryProcedure(isPrimary);

    return patientProcedure;
}
项目:AvoinApotti    文件:Logic.java   
private String getTooltipFromProcedure(PatientProcedureApptDetailVo procedure)
{
    if(procedure == null)
        return null;

    StringBuffer tooltip = new StringBuffer();

    tooltip.append(procedure.getProcDate()!=null ? procedure.getProcDate().toString()+" - ":"");//WDEV-15507
    tooltip.append((procedure.getProcedure() != null ? procedure.getProcedure().getProcedureName() : procedure.getProcedureDescription())+" - ");
    //WDEV-15507
    if (procedure.getProcedureStatus()!=null && procedure.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED))
        tooltip.append("Complete - ");
    else if (procedure.getProcedureStatus()!=null && procedure.getProcedureStatus().equals(PatientProcedureStatus.INCOMPLETE))
        tooltip.append(procedure.getProcedureStatus().toString()+" - Reason: "+procedure.getIncompleteReason()+ " - ");

    tooltip.append(procedure.getAuthoringInformation() != null ? procedure.getAuthoringInformation().getAuthoringDateTime() : "");
    tooltip.append(" - " + (procedure.getAuthoringInformation() != null ? procedure.getAuthoringInformation().getAuthoringHcp().getIHcpName() : ""));

    return tooltip.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void updateMenuContext()
{
    form.getContextMenus().Clinical.hideAllPlannedActualProcedureMenuItems();
    form.getContextMenus().Clinical.hideAllSurgicalAuditSurgicalPacksMenuItems();

    if( form.getMode().equals(FormMode.EDIT))
    {
        form.getContextMenus().Clinical.getPlannedActualProcedureADDItem().setVisible(true);
        //form.getContextMenus().Clinical.getPlannedActualProcedureEDITItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null);
        form.getContextMenus().Clinical.getPlannedActualProcedureCANCEL_THIS_PROCEDUREItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.CANCELLED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureSETSTATUSTOPERFORMEDItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.PERFORMED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureREMOVEItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !Boolean.TRUE.equals(form.grdPlannedPerformedProcedure().getValue().getIsSaved()));

        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksADDItem().setVisible(true);
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksEDITItem().setVisible(form.grdSurgicalPack().getValue() != null );
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksREMOVEItem().setVisible(form.grdSurgicalPack().getValue() != null && !Boolean.TRUE.equals(form.grdSurgicalPack().getValue().getIsSaved()));

    }


}
项目:AvoinApotti    文件:Logic.java   
private String getDate(PatientProcedureShortVo voPatientProcedureShort)
{
    PartialDate procDate = null;
    if (voPatientProcedureShort != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedureShort.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                procDate = voPatientProcedureShort.getDatePlanned();
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                procDate = voPatientProcedureShort.getProcDate();
            }
        }
    }

    return procDate != null ? procDate.toString() : "";
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureSurgicalOpVo createPatientProcedure(ProcedureLiteVo proc)
{
    PatientProcedureSurgicalOpVo patProc = new PatientProcedureSurgicalOpVo();
    patProc.setProcedure(proc);
    patProc.setAuthoringInformation(getAuthoringInfo());
    patProc.setProcedureDescription(proc.getProcedureName());
    patProc.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    //wdev-11815
    patProc.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare());
    //-----
    patProc.setIncludeInDischargeLetter(true);
    patProc.setInfoSource(SourceofInformation.CLINICALCONTACT);
    patProc.setProcedureStatus(PatientProcedureStatus.PERFORMED);
    return patProc;

}
项目:AvoinApotti    文件:Logic.java   
private String getDate(PatientProcedureShortVo voPatientProcedureShort)
{
    PartialDate procDate = null;
    if (voPatientProcedureShort != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedureShort.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                procDate = voPatientProcedureShort.getDatePlanned();
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                procDate = voPatientProcedureShort.getProcDate();
            }
        }
    }

    return procDate != null ? procDate.toString() : "";
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);

    patientProcedure.setCareContext(careContext);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyr1().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyr1().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    patientProcedure.setCareContext(careContext);
    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyrMain().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyrMain().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:openMAXIMS    文件:ReferralExternalCodingImpl.java   
public PatientProcedureForReferralCodingVoCollection listProcedure(EpisodeOfCareRefVo episodeOfCare)
{
    if(episodeOfCare == null || episodeOfCare.getID_EpisodeOfCare() == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = "select patproc from PatientProcedure as patproc left join patproc.episodeOfCare as ep where ep.id = :EpisodeOfCareId and patproc.procedureStatus = :performed order by patproc.procDate desc";

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

    markers.add("EpisodeOfCareId");
    values.add(episodeOfCare.getID_EpisodeOfCare());
    markers.add("performed");
    values.add(getDomLookup(PatientProcedureStatus.PERFORMED));

    return PatientProcedureForReferralCodingVoAssembler.createPatientProcedureForReferralCodingVoCollectionFromPatientProcedure(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:Logic.java   
private PatientProcedureApptDetailVo populatePatientProcedureFromScreen(ProcedureLiteVo procedure, Boolean isPrimary, CatsReferralForClinicalNotesVo referral)
{
    if(procedure == null)
        return null;

    PatientProcedureApptDetailVo patientProcedure = new PatientProcedureApptDetailVo();
    patientProcedure.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures());

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(procedure.getProcedureName());
    patientProcedure.setInfoSource(SourceofInformation.CLINICALCONTACT);
    patientProcedure.setAuthoringInformation(form.ccAuthoringInfo().getValue());
    patientProcedure.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare());
    patientProcedure.setCareContext(referral.getCareContext());
    patientProcedure.setProcDate(form.pdtPerformed().getValue());
    patientProcedure.setProcedureStatus(OutcomeEnumeration.rdoComplete.equals(form.Outcome().getValue()) ? PatientProcedureStatus.PERFORMED : PatientProcedureStatus.INCOMPLETE);
    patientProcedure.setIncompleteReason(OutcomeEnumeration.rdoIncomplete.equals(form.Outcome().getValue()) ? form.cmbReason().getValue() : null);
    patientProcedure.setIsPrimaryProcedure(isPrimary);

    return patientProcedure;
}
项目:openMAXIMS    文件:Logic.java   
private String getTooltipFromProcedure(PatientProcedureApptDetailVo procedure)
{
    if(procedure == null)
        return null;

    StringBuffer tooltip = new StringBuffer();

    tooltip.append(procedure.getProcDate()!=null ? procedure.getProcDate().toString()+" - ":"");//WDEV-15507
    tooltip.append((procedure.getProcedure() != null ? procedure.getProcedure().getProcedureName() : procedure.getProcedureDescription())+" - ");
    //WDEV-15507
    if (procedure.getProcedureStatus()!=null && procedure.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED))
        tooltip.append("Complete - ");
    else if (procedure.getProcedureStatus()!=null && procedure.getProcedureStatus().equals(PatientProcedureStatus.INCOMPLETE))
        tooltip.append(procedure.getProcedureStatus().toString()+" - Reason: "+procedure.getIncompleteReason()+ " - ");

    tooltip.append(procedure.getAuthoringInformation() != null ? procedure.getAuthoringInformation().getAuthoringDateTime() : "");
    tooltip.append(" - " + (procedure.getAuthoringInformation() != null ? procedure.getAuthoringInformation().getAuthoringHcp().getIHcpName() : ""));

    return tooltip.toString();
}
项目:openMAXIMS    文件:ReferralCodingImpl.java   
public PatientProcedureShortWithCareIntraOperativeVoCollection listOutpatientCodingProceduresForReferral(CatsReferralRefVo catsReferralRef, CareContextRefVo careContextRef)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    hql.append(" select patProc from PatientProcedure as patProc left join patProc.careContext as cc left join patProc.procedureStatus as procStatus where cc.id = :careContextId and procStatus.id = :statusId");

    markers.add("careContextId");
    values.add(careContextRef.getID_CareContext());

    markers.add("statusId");
    values.add(PatientProcedureStatus.PERFORMED.getID());

    return PatientProcedureShortWithCareIntraOperativeVoAssembler.createPatientProcedureShortWithCareIntraOperativeVoCollectionFromPatientProcedure(factory.find(hql.toString(), markers, values)).sort();
}
项目:openmaxims-linux    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);

    patientProcedure.setCareContext(careContext);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyr1().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyr1().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:openMAXIMS    文件:Logic.java   
private void updateMenuContext()
{
    form.getContextMenus().Clinical.hideAllPlannedActualProcedureMenuItems();
    form.getContextMenus().Clinical.hideAllSurgicalAuditSurgicalPacksMenuItems();

    if( form.getMode().equals(FormMode.EDIT))
    {
        form.getContextMenus().Clinical.getPlannedActualProcedureADDItem().setVisible(true);
        //form.getContextMenus().Clinical.getPlannedActualProcedureEDITItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null);
        form.getContextMenus().Clinical.getPlannedActualProcedureCANCEL_THIS_PROCEDUREItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.CANCELLED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureSETSTATUSTOPERFORMEDItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.PERFORMED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureREMOVEItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !Boolean.TRUE.equals(form.grdPlannedPerformedProcedure().getValue().getIsSaved()));

        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksADDItem().setVisible(true);
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksEDITItem().setVisible(form.grdSurgicalPack().getValue() != null );
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksREMOVEItem().setVisible(form.grdSurgicalPack().getValue() != null && !Boolean.TRUE.equals(form.grdSurgicalPack().getValue().getIsSaved()));

    }


}
项目:openMAXIMS    文件:Logic.java   
private String getDate(PatientProcedureShortVo voPatientProcedureShort)
{
    PartialDate procDate = null;
    if (voPatientProcedureShort != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedureShort.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                procDate = voPatientProcedureShort.getDatePlanned();
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                procDate = voPatientProcedureShort.getProcDate();
            }
        }
    }

    return procDate != null ? procDate.toString() : "";
}
项目:openMAXIMS    文件:Logic.java   
private String getDate(PatientProcedureShortVo voPatientProcedureShort)
{
    PartialDate procDate = null;
    if (voPatientProcedureShort != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedureShort.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                procDate = voPatientProcedureShort.getDatePlanned();
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                procDate = voPatientProcedureShort.getProcDate();
            }
        }
    }

    return procDate != null ? procDate.toString() : "";
}
项目:openMAXIMS    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);

    patientProcedure.setCareContext(careContext);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());

    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyr1().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyr1().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:openMAXIMS    文件:Logic.java   
private IntraOpPlannedProcedureVo populatePlannedProcedureInstanceData(IntraOpPlannedProcedureVo planned)
{
    if (planned == null)
        planned = new IntraOpPlannedProcedureVo();

    PatientProcedureMinVo patientPlannedProc = planned.getPlannedProcedure();
    if (patientPlannedProc == null)
        patientPlannedProc = new PatientProcedureMinVo();

    patientPlannedProc.setProcedure(form.lyrIntra().tabPlannedProcedures().qmbPlannedProcedure().getValue());
    patientPlannedProc.setNotes(form.lyrIntra().tabPlannedProcedures().txtProcedureComment().getValue());
    patientPlannedProc.setProcLaterality(form.lyrIntra().tabPlannedProcedures().cmbLaterality().getValue());

    //WDEV-22558
    patientPlannedProc.setProcedureStatus(PatientProcedureStatus.PLANNED); 
    patientPlannedProc.setDatePlanned(form.getLocalContext().getTheatreSession()!=null && form.getLocalContext().getTheatreSession().getSessionDate()!=null ? form.getLocalContext().getTheatreSession().getSessionDate().toPartialDate() : null);      
    planned.setPlannedProcedure(patientPlannedProc);

    planned.setTheatreAppointment(form.getGlobalContext().Clinical.getTheatreAppointmentRef());


    return planned;
}
项目:openMAXIMS    文件:Logic.java   
private PerformedProceduresIntraOpVo populatePerformedProcedureInstanceData(PerformedProceduresIntraOpVo performed)
{
    if (performed == null)
        performed = new PerformedProceduresIntraOpVo();

    PatientProcedureMinVo patientPerformedProc = performed.getPerformedProcedure();
    if (patientPerformedProc == null)
        patientPerformedProc = new PatientProcedureMinVo();

    patientPerformedProc.setProcedure(form.lyrIntra().tabPerformedProcedures().qmbPerformedProcedure().getValue());
    patientPerformedProc.setNotes(form.lyrIntra().tabPerformedProcedures().txtPerformedComments().getValue());
    patientPerformedProc.setProcLaterality(form.lyrIntra().tabPerformedProcedures().cmbPerformedLaterality().getValue());

    //WDEV-22558
    patientPerformedProc.setProcedureStatus(PatientProcedureStatus.PERFORMED); 
    patientPerformedProc.setProcDate((new DateTime()).getDate().toPartialDate());
    patientPerformedProc.setProcTime(new Time());

    performed.setPerformedProcedure(patientPerformedProc);
    performed.setTheatreAppointment(form.getGlobalContext().Clinical.getTheatreAppointmentRef());

    return performed;
}
项目:openMAXIMS    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    patientProcedure.setCareContext(careContext);
    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyrMain().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyrMain().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:openmaxims-linux    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    patientProcedure.setCareContext(careContext);
    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyrMain().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyrMain().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateMenuContext()
{
    form.getContextMenus().Clinical.hideAllPlannedActualProcedureMenuItems();
    form.getContextMenus().Clinical.hideAllSurgicalAuditSurgicalPacksMenuItems();

    if( form.getMode().equals(FormMode.EDIT))
    {
        form.getContextMenus().Clinical.getPlannedActualProcedureADDItem().setVisible(true);
        //form.getContextMenus().Clinical.getPlannedActualProcedureEDITItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null);
        form.getContextMenus().Clinical.getPlannedActualProcedureCANCEL_THIS_PROCEDUREItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.CANCELLED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureSETSTATUSTOPERFORMEDItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.PERFORMED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureREMOVEItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !Boolean.TRUE.equals(form.grdPlannedPerformedProcedure().getValue().getIsSaved()));

        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksADDItem().setVisible(true);
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksEDITItem().setVisible(form.grdSurgicalPack().getValue() != null );
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksREMOVEItem().setVisible(form.grdSurgicalPack().getValue() != null && !Boolean.TRUE.equals(form.grdSurgicalPack().getValue().getIsSaved()));

    }


}
项目:openMAXIMS    文件:Logic.java   
private PatientProcedureApptDetailVo populatePatientProcedureFromScreen(ProcedureLiteVo procedure, Boolean isPrimary, CatsReferralForClinicalNotesVo referral)
{
    if(procedure == null)
        return null;

    PatientProcedureApptDetailVo patientProcedure = new PatientProcedureApptDetailVo();
    patientProcedure.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures());

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(procedure.getProcedureName());
    patientProcedure.setInfoSource(SourceofInformation.CLINICALCONTACT);
    patientProcedure.setAuthoringInformation(form.ccAuthoringInfo().getValue());
    patientProcedure.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare());
    patientProcedure.setCareContext(referral.getCareContext());
    patientProcedure.setProcDate(form.pdtPerformed().getValue());
    patientProcedure.setProcedureStatus(OutcomeEnumeration.rdoComplete.equals(form.Outcome().getValue()) ? PatientProcedureStatus.PERFORMED : PatientProcedureStatus.INCOMPLETE);
    patientProcedure.setIncompleteReason(OutcomeEnumeration.rdoIncomplete.equals(form.Outcome().getValue()) ? form.cmbReason().getValue() : null);
    patientProcedure.setIsPrimaryProcedure(isPrimary);

    return patientProcedure;
}
项目:openMAXIMS    文件:Logic.java   
private String getTooltipFromProcedure(PatientProcedureApptDetailVo procedure)
{
    if(procedure == null)
        return null;

    StringBuffer tooltip = new StringBuffer();

    tooltip.append(procedure.getProcDate()!=null ? procedure.getProcDate().toString()+" - ":"");//WDEV-15507
    tooltip.append((procedure.getProcedure() != null ? procedure.getProcedure().getProcedureName() : procedure.getProcedureDescription())+" - ");
    //WDEV-15507
    if (procedure.getProcedureStatus()!=null && procedure.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED))
        tooltip.append("Complete - ");
    else if (procedure.getProcedureStatus()!=null && procedure.getProcedureStatus().equals(PatientProcedureStatus.INCOMPLETE))
        tooltip.append(procedure.getProcedureStatus().toString()+" - Reason: "+procedure.getIncompleteReason()+ " - ");

    tooltip.append(procedure.getAuthoringInformation() != null ? procedure.getAuthoringInformation().getAuthoringDateTime() : "");
    tooltip.append(" - " + (procedure.getAuthoringInformation() != null ? procedure.getAuthoringInformation().getAuthoringHcp().getIHcpName() : ""));

    return tooltip.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void updateMenuContext()
{
    form.getContextMenus().Clinical.hideAllPlannedActualProcedureMenuItems();
    form.getContextMenus().Clinical.hideAllSurgicalAuditSurgicalPacksMenuItems();

    if( form.getMode().equals(FormMode.EDIT))
    {
        form.getContextMenus().Clinical.getPlannedActualProcedureADDItem().setVisible(true);
        //form.getContextMenus().Clinical.getPlannedActualProcedureEDITItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null);
        form.getContextMenus().Clinical.getPlannedActualProcedureCANCEL_THIS_PROCEDUREItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.CANCELLED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureSETSTATUSTOPERFORMEDItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !PatientProcedureStatus.PERFORMED.equals(form.grdPlannedPerformedProcedure().getValue().getProcedureStatus()));
        form.getContextMenus().Clinical.getPlannedActualProcedureREMOVEItem().setVisible(form.grdPlannedPerformedProcedure().getValue() != null && !Boolean.TRUE.equals(form.grdPlannedPerformedProcedure().getValue().getIsSaved()));

        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksADDItem().setVisible(true);
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksEDITItem().setVisible(form.grdSurgicalPack().getValue() != null );
        form.getContextMenus().Clinical.getSurgicalAuditSurgicalPacksREMOVEItem().setVisible(form.grdSurgicalPack().getValue() != null && !Boolean.TRUE.equals(form.grdSurgicalPack().getValue().getIsSaved()));

    }


}
项目:openmaxims-linux    文件:Logic.java   
private String getDate(PatientProcedureShortVo voPatientProcedureShort)
{
    PartialDate procDate = null;
    if (voPatientProcedureShort != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedureShort.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                procDate = voPatientProcedureShort.getDatePlanned();
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                procDate = voPatientProcedureShort.getProcDate();
            }
        }
    }

    return procDate != null ? procDate.toString() : "";
}
项目:openMAXIMS    文件:Logic.java   
private String getDate(PatientProcedureShortVo voPatientProcedureShort)
{
    PartialDate procDate = null;
    if (voPatientProcedureShort != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedureShort.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                procDate = voPatientProcedureShort.getDatePlanned();
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                procDate = voPatientProcedureShort.getProcDate();
            }
        }
    }

    return procDate != null ? procDate.toString() : "";
}
项目:openmaxims-linux    文件:Logic.java   
private PatientProcedureSurgicalOpVo createPatientProcedure(ProcedureLiteVo proc)
{
    PatientProcedureSurgicalOpVo patProc = new PatientProcedureSurgicalOpVo();
    patProc.setProcedure(proc);
    patProc.setAuthoringInformation(getAuthoringInfo());
    patProc.setProcedureDescription(proc.getProcedureName());
    patProc.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    //wdev-11815
    patProc.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare());
    //-----
    patProc.setIncludeInDischargeLetter(true);
    patProc.setInfoSource(SourceofInformation.CLINICALCONTACT);
    patProc.setProcedureStatus(PatientProcedureStatus.PERFORMED);
    return patProc;

}
项目:openmaxims-linux    文件:Logic.java   
private void populateItemFromRow(PatientProcedureVo item, grdProceduresRow childRow)
{
    if(item == null)
        return;

    item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    item.setProcDate(childRow.getcolOnset());
    item.setProcedure((ProcedureLiteVo) childRow.getValue());
    item.setNotes(childRow.getcolNotes());
    item.setProcedureDescription(childRow.getcolNotes());
    item.setSpecialty((Specialty) childRow.getParentRow().getValue());
    item.setInfoSource(SourceofInformation.CLINICALCONTACT);
    item.setProcedureStatus(PatientProcedureStatus.PERFORMED);

    if(item.getAuthoringInformation() == null)
    {
        item.setAuthoringInformation(getAuthoringInfo());
    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation)
{
    if (description == null || careContext == null || sourceOfInformation == null)
        return null;

    PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo();

    patientProcedure.setProcedure(procedure);
    patientProcedure.setProcedureDescription(description);
    patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    patientProcedure.setCareContext(careContext);
    patientProcedure.setAuthoringInformation(authoringInformation);
    patientProcedure.setInfoSource(sourceOfInformation);
    patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED);
    patientProcedure.setProcDate(form.lyrMain().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyrMain().tabCareRecord().dteDate().getValue()) : null);// wdev-8393

    return patientProcedure;
}
项目:AvoinApotti    文件:Logic.java   
private void displayProcedureCollection(PatientProcedureShortVoCollection voCollProcedure)
{
    if (voCollProcedure != null)
    {
        for (int i = 0; i < voCollProcedure.size(); i++)
        {
            if(PatientProcedureStatus.PERFORMED.equals(voCollProcedure.get(i).getProcedureStatus())
                    || (PatientProcedureStatus.PLANNED.equals(voCollProcedure.get(i).getProcedureStatus()) && voCollProcedure.get(i).getProcedureOutcome()==null)){
                GenForm.grdDiagnosisRow pRow = form.grdDiagnosis().getRows().newRow();
                pRow.setColDiagnosis(voCollProcedure.get(i).getProcedureDescription());
                pRow.setValue(voCollProcedure.get(i));
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureForAppointmentOutcomeVo populateDataFromScreen(PatientProcedureForAppointmentOutcomeVo patientProcedureForAppointmentOutcome)
{
    if(patientProcedureForAppointmentOutcome == null)
        patientProcedureForAppointmentOutcome = new PatientProcedureForAppointmentOutcomeVo();
    else
        patientProcedureForAppointmentOutcome = (PatientProcedureForAppointmentOutcomeVo) patientProcedureForAppointmentOutcome.clone();

    if(patientProcedureForAppointmentOutcome.getID_PatientProcedure() == null)
    {
        patientProcedureForAppointmentOutcome.setEpisodeOfCare(form.getLocalContext().getCareContext() != null ? form.getLocalContext().getCareContext().getEpisodeOfCare() : null);
        patientProcedureForAppointmentOutcome.setCareContext(form.getLocalContext().getCareContext());      
        patientProcedureForAppointmentOutcome.setInfoSource(SourceofInformation.CLINICALCONTACT);
        patientProcedureForAppointmentOutcome.setProcDate(form.getLocalContext().getAppointmentDate() != null ? form.getLocalContext().getAppointmentDate().toPartialDate() : null);
    }

    if (patientProcedureForAppointmentOutcome.getProcedureStatus()==null)
        patientProcedureForAppointmentOutcome.setProcedureStatus(PatientProcedureStatus.PLANNED);

    IClinicalCodingValue procedureControlValue = form.ccProcedure().getValue();

    if(procedureControlValue != null)
    {
        if(procedureControlValue.getIClinicalCodingValue() instanceof ProcedureLiteVo)
        {
            patientProcedureForAppointmentOutcome.setProcedure((ProcedureLiteVo) procedureControlValue.getIClinicalCodingValue());
        }

        patientProcedureForAppointmentOutcome.setProcedureDescription(procedureControlValue.getIClinicalCodingValueDescription());
    }

    patientProcedureForAppointmentOutcome.setIsPrimary(form.chkPrimary().getValue());
    patientProcedureForAppointmentOutcome.setProcLaterality(form.cmbLaterality().getValue());
    patientProcedureForAppointmentOutcome.setSiteText(form.txtSite().getValue());
    patientProcedureForAppointmentOutcome.setPeformedBy(form.ccPerformedBy().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccPerformedBy().getValue() : null);

    return patientProcedureForAppointmentOutcome;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(PatientProcedureApptDetailVo patientProcedure)
{
    if(patientProcedure == null)
        return;

    form.ccProcedure().setValue(patientProcedure);
    form.ccAuthoring().setValue(patientProcedure.getAuthoringInformation());
    form.chkPrimary().setValue(patientProcedure.getIsPrimaryProcedure());
    form.pdtProcDate().setValue(patientProcedure.getProcDate());

    PatientProcedureStatus status = patientProcedure.getProcedureStatus();
    form.Outcome().setValue(PatientProcedureStatus.PERFORMED.equals(status) ? OutcomeEnumeration.rdoComplete : (PatientProcedureStatus.INCOMPLETE.equals(status) ? OutcomeEnumeration.rdoIncomplete : null));

    form.cmbReason().setValue(patientProcedure.getIncompleteReason());
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureApptDetailVo populateDataFromScreen()
{
    PatientProcedureApptDetailVo patientProcedure = form.getGlobalContext().RefMan.getAppointmentPatientProcedure();

    patientProcedure.setIsPrimaryProcedure(form.chkPrimary().getValue());
    patientProcedure.setProcDate(form.pdtProcDate().getValue());
    patientProcedure.setProcedureStatus(OutcomeEnumeration.rdoComplete.equals(form.Outcome().getValue()) ? PatientProcedureStatus.PERFORMED : PatientProcedureStatus.INCOMPLETE);
    patientProcedure.setIncompleteReason(OutcomeEnumeration.rdoIncomplete.equals(form.Outcome().getValue()) ? form.cmbReason().getValue() : null);

    return patientProcedure;
}
项目:AvoinApotti    文件:Logic.java   
boolean isPerformedOrCancelled(PatientProcedureForSurgicalAuditPreOpChecksVo patproc )
{
    if( PatientProcedureStatus.PERFORMED.equals(patproc.getProcedureStatus()) || PatientProcedureStatus.CANCELLED.equals(patproc.getProcedureStatus()))
        return true;
    else
        return false;
}
项目:AvoinApotti    文件:Logic.java   
private void populateProcedures(PatientProcedureShortVoCollection voCollProcedure)
{
    form.ctnSummary().grdProcedure().getRows().clear();
    if (voCollProcedure != null)
    {
        for (int i = 0; i < voCollProcedure.size(); i++)
        {
            PatientProcedureShortVo voPatientProcedureShort = voCollProcedure.get(i);
            if (voPatientProcedureShort.getProcedureStatusIsNotNull())
            {
                if ((voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PLANNED) && (voPatientProcedureShort.getProcedureOutcome() == null || voPatientProcedureShort.getProcedureOutcome().equals(PatientProcedureOutcome.CANCELLED)) || (voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED))))
                {
                    GenForm.ctnSummaryContainer.grdProcedureRow pRow = form.ctnSummary().grdProcedure().getRows().newRow();
                    pRow.setColImage(getProcedureLateralityImg(voPatientProcedureShort.getProcLaterality(), voPatientProcedureShort.getProcedureStatus()));
                    pRow.setColText(getProcedureText(voPatientProcedureShort));
                    pRow.setTooltipForColText(voPatientProcedureShort.createTooltipForPatientSummary());
                    pRow.setColDatePerformed(getDate(voPatientProcedureShort));
                    if (voPatientProcedureShort.getSysInfoIsNotNull() && voPatientProcedureShort.getSysInfo().getLastupdateUser() != null)
                        pRow.setcolHasAudit(form.getImages().Core.EditDisabled);
                    pRow.setTooltip(voPatientProcedureShort.getDiAssociationsTooltip());
                    pRow.setColStatus(getStatus(voPatientProcedureShort));
                    pRow.setValue(voPatientProcedureShort);
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientProcedureStatus getProcedureStatus()
{
    GroupProcedureEnumeration procedureGroupValue = form.ctnSummary().GroupProcedure().getValue();

    if (procedureGroupValue != null)
    {
        if (procedureGroupValue.equals(GenForm.ctnSummaryContainer.GroupProcedureEnumeration.rdoPerformedProcedure))
            return PatientProcedureStatus.PERFORMED;
        if (procedureGroupValue.equals(GenForm.ctnSummaryContainer.GroupProcedureEnumeration.rdoPlannedProcedure))
            return PatientProcedureStatus.PLANNED;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private Image getProcedureLateralityImg(LateralityLRB procLaterality, PatientProcedureStatus status)
{
    if (procLaterality != null && status != null)
    {
        if (procLaterality.equals(LateralityLRB.LEFT))
        {
            if (status.equals(PatientProcedureStatus.PLANNED))
                return form.getImages().COE.DarkCyanLeft;
            else if (status.equals(PatientProcedureStatus.PERFORMED))
                return form.getImages().COE.OrangeLeft;

        }
        else if (procLaterality.equals(LateralityLRB.RIGHT))
        {
            if (status.equals(PatientProcedureStatus.PLANNED))
                return form.getImages().COE.DarkCyanRight;
            else if (status.equals(PatientProcedureStatus.PERFORMED))
                return form.getImages().COE.OrangeRight;

        }
        else if (procLaterality.equals(LateralityLRB.BILATERAL))
        {
            if (status.equals(PatientProcedureStatus.PLANNED))
                return form.getImages().COE.DarkCyanBoth;
            else if (status.equals(PatientProcedureStatus.PERFORMED))
                return form.getImages().COE.OrangeBoth;
        }
    }
    else
    {
        if (status != null)
        {
            if (status.equals(PatientProcedureStatus.PLANNED))
                return form.getImages().COE.DarkCyan;
            else if (status.equals(PatientProcedureStatus.PERFORMED))
                return form.getImages().COE.Orange;
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String getStatus(PatientProcedureShortVo voPatientProcedure)
{
    String status = "";
    if (voPatientProcedure != null)
    {
        PatientProcedureStatus procedureStatus = voPatientProcedure.getProcedureStatus();
        if (procedureStatus != null)
        {
            if (procedureStatus.equals(PatientProcedureStatus.PLANNED))
            {
                if (voPatientProcedure.getDatePlannedIsNotNull())
                {
                    status = "Booked";
                }
                else
                {
                    status = PatientProcedureStatus.PLANNED.toString();
                }
            }
            else if (procedureStatus.equals(PatientProcedureStatus.PERFORMED))
            {
                status = PatientProcedureStatus.PERFORMED.toString();
            }
        }
    }

    return status;
}