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

项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromPatientSelected(PatientShort voPatient)
{
    clearScreen();

    if(voPatient == null)
        return;

    if(form.getGlobalContext().Core.getADTWardIsNotNull())
    {
        form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
        form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
    }

    //WDEV-10076
    form.cmbMethod().setValue(null);
    form.dtimAdmit().setValue(new DateTime());
    form.dteEstDischarge().setValue(new Date());    
    form.chkChaplain().setValue(false);

    form.cmbPatientStatus().setValue(PatientStatus.NHS);

    loadEpisodes();

}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo populatePendingTransferOnAcceptFromScreen(PendingTransfersLiteVo value)
{
    if (value == null)
        return null;

    if (value.getPatientStatus() == null )
        value.setPatientStatus(value.getInpatientEpisode().getPasEvent().getPatient().getPatientCategory() != null ? value.getInpatientEpisode().getPasEvent().getPatient().getPatientCategory() : PatientStatus.NHS);
    value.setWardType(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().getValue());
    value.setService(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().qmbInService().getValue());
    value.setSpecialty(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().getValue());
    value.setTransferRequestDateTime(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dtimTransfer().getValue());
    value.setCurrentStatus(TransferStatus.TRANSFERRED);

    if (form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue() instanceof MedicVo)
    {       
        value.setConsultant((MedicVo)form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue());
    }
    return value;
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
private void addConsultantStay(InpatientEpisode doInpat, PatientStatus patientCategory)
{
    Date transferDate = getMostRecentWardStayTransferDate(doInpat);
    LookupInstance patientCategoryForStay  = patientCategory != null ? getDomLookup(patientCategory) : doInpat.getPasEvent().getPatient().getPatientCategory();
    ConsultantStay oldCS = updateCurrentConsultantStay(doInpat.getConsultantStays());
    if(oldCS != null)
    {
        oldCS.setEndDateTime(transferDate);
    }

    ConsultantStay doConsStay = new ConsultantStay();
    doConsStay.setConsultant(doInpat.getPasEvent().getConsultant());
    doConsStay.setTransferDateTime(transferDate);
    doConsStay.setSpecialty(doInpat.getPasEvent().getSpecialty());
    doConsStay.setService(doInpat.getPasEvent().getService());
    doConsStay.setPatientStatus(patientCategoryForStay);

    doInpat.getConsultantStays().add(doConsStay);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromPatientSelected(PatientShort voPatient)
{
    clearScreen();

    if(voPatient == null)
        return;

    if(form.getGlobalContext().Core.getADTWardIsNotNull())
    {
        form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
        form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
    }

    //WDEV-10076
    form.cmbMethod().setValue(null);
    form.dtimAdmit().setValue(new DateTime());
    form.dteEstDischarge().setValue(new Date());    
    form.chkChaplain().setValue(false);

    form.cmbPatientStatus().setValue(PatientStatus.NHS);

    loadEpisodes();

}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromPatientSelected(PatientShort voPatient)
{
    clearScreen();

    if(voPatient == null)
        return;

    if(form.getGlobalContext().Core.getADTWardIsNotNull())
    {
        form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
        form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
    }

    //WDEV-10076
    form.cmbMethod().setValue(null);
    form.dtimAdmit().setValue(new DateTime());
    form.dteEstDischarge().setValue(new Date());    
    form.chkChaplain().setValue(false);

    form.cmbPatientStatus().setValue(PatientStatus.NHS);

    loadEpisodes();

}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws ims.framework.exceptions.PresentationLogicException
{
    // Clear screen
    clearInstanceControls();        
    // Clear local context
    form.getGlobalContext().Core.setSelectedPendingNonEDEmergencyAdmission(null);

    //Default hospital WDEV-22230
    ILocation currentLocation = engine.getCurrentLocation();
    setDefaultLocation(currentLocation);

    // Set Referral Date
    form.dteReferralDate().setValue(new Date());

    // Set Recording user
    MemberOfStaffLiteVo mosUser = (MemberOfStaffLiteVo) domain.getMosUser();
    if (mosUser != null)
    {
        form.qmbRecordingUser().newRow(mosUser, mosUser.getIMosName());
        form.qmbRecordingUser().setValue(mosUser);
    }

    // Set Recording date time
    form.dtimRecordingDateTime().setValue(new DateTime());

    //Set Patient Category WDEV-21221 //WDEV-22272
    form.cmbPatientCategory().setValue(form.getGlobalContext().Core.getPatientShort().getPatientCategory() != null ? form.getGlobalContext().Core.getPatientShort().getPatientCategory() : PatientStatus.NHS);
    // TODO: Set defaults


    // Set form in Edit mode
    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function used to create a Consultant Stay record on admission
 * @param consultant
 * @param patientCategory
 * @param transferDateTime
 * @param serviceLiteVo 
 * @param specialty
 * @return
 */
private ConsultantStayVo createConsultantStay(MedicVo consultant, PatientStatus patientCategory, DateTime transferDateTime, ServiceLiteVo serviceLiteVo, Specialty specialty)
{
    ConsultantStayVo consultantStay = new ConsultantStayVo();

    consultantStay.setConsultant(consultant);
    consultantStay.setPatientStatus(patientCategory);
    consultantStay.setTransferDateTime(transferDateTime);
    consultantStay.setService(serviceLiteVo);
    consultantStay.setSpecialty(specialty);

    return consultantStay;
}
项目:openMAXIMS    文件:Logic.java   
public Boolean isPrivateBedAdmission()
{
    if (form.getGlobalContext().Core.getSelectedBedSpaceState() == null || form.getGlobalContext().Core.getSelectedBedSpaceState().getBedSpace() == null)
        return false;
    if (Boolean.TRUE.equals(form.getGlobalContext().Core.getSelectedBedSpaceState().getBedSpace().getPrivateBed()) && form.cmbPatientStatus().getValue() != null && !PatientStatus.PRIVATE.equals(form.cmbPatientStatus().getValue()))
        return true;
    return false;   
}
项目:openMAXIMS    文件:Logic.java   
private boolean isPrivateBedAllocation()
{
    if (form.grdAvailableBeds().getValue() == null || form.grdAvailableBeds().getValue().getBedSpace() == null || form.getLocalContext().getSelectedAdmissionDetail() == null)
        return false;
    if (Boolean.TRUE.equals(form.grdAvailableBeds().getValue().getBedSpace().getPrivateBed()) && !PatientStatus.PRIVATE.equals(form.getLocalContext().getSelectedAdmissionDetail().getPatientStatus()))
        return true;
    return false;   
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
/**
 * @param patientStatus 
 * @method addConsultantStayIfNeeded
 * @comment does InpatientAssembler call also - MUST BE CALLED
 * 
 */
private InpatientEpisode addConsultantStayIfNeeded(InPatientEpisodeADTVo inpatientEpisode, PatientStatus patientStatus)
{
    if(inpatientEpisode == null)
        throw new CodingRuntimeException("inpatientEpisode is null in method addConsultantStayIfNeeded"); 

    DomainFactory factory = getDomainFactory();
    Medic doExistingCons = null;
    LookupInstance doExistingSpecialty = null;
    Service doExistingService = null;
    if (inpatientEpisode.getPasEventIsNotNull() && inpatientEpisode.getPasEvent().getBoId() != null)
    {
        PASEvent doExistingPe = (PASEvent)factory.getDomainObject(PASEvent.class, inpatientEpisode.getPasEvent().getBoId());
        doExistingCons = doExistingPe != null ? doExistingPe.getConsultant() : null;
        doExistingService =  doExistingPe != null ? doExistingPe.getService() : null;
        doExistingSpecialty = doExistingPe != null ? doExistingPe.getSpecialty() : null;
    }

    InpatientEpisode doInpat = InPatientEpisodeADTVoAssembler.extractInpatientEpisode(factory, inpatientEpisode);
    //WDEV-22892
    if (inpatientEpisode.getPasEventIsNotNull())
    {           
        boolean consultantHasChanged = inpatientEpisode.getPasEvent().getConsultantIsNotNull() && doExistingCons != null && !doInpat.getPasEvent().getConsultant().equals(doExistingCons);
        boolean serviceChanged = inpatientEpisode.getPasEvent().getService() != null && !inpatientEpisode.getPasEvent().getService().equals(doExistingService);
        boolean specialtyChanged = inpatientEpisode.getPasEvent().getSpecialty() != null && !inpatientEpisode.getPasEvent().getSpecialty().equals(doExistingSpecialty);

        if (consultantHasChanged || (serviceChanged && consultantHasChanged) || (specialtyChanged && consultantHasChanged))
        {
            addConsultantStay(doInpat,patientStatus);
        }                           
    }

    return doInpat;
}
项目:openMAXIMS    文件:Logic.java   
private WardStayVo createWardStay(DateTime admissionDateTime, PatientStatus patientCategory, ServiceLiteVo serviceLiteVo, BedSpaceStateLiteVo bedSpaceState)
{
    WardStayVo wardStay = new WardStayVo();

    wardStay.setTransferDateTime(admissionDateTime);
    wardStay.setPatientStatus(patientCategory);
    wardStay.setService(serviceLiteVo);

    if (bedSpaceState != null)
    {
        wardStay.setBedSpace(bedSpaceState.getBedSpace());
        wardStay.setWard(bedSpaceState.getWard());
        wardStay.setBay(bedSpaceState.getBay());

        if (bedSpaceState.getBedSpace() != null)
        {
            wardStay.setWardType(bedSpaceState.getBedSpace().getWardType());

            if (form.getGlobalContext().Core.getBedRuleBreachReason() != null)
            {
                if (Boolean.TRUE.equals(form.getGlobalContext().Core.getBedRuleBreachReason().getIsPrivateBedAllocationValidated()))
                {
                    wardStay.setReasonPrivateBedAllocated(form.getGlobalContext().Core.getBedRuleBreachReason().getReasonForPrivateBedAllocation());
                    wardStay.setReasonPrivateBedAllocatedComment(form.getGlobalContext().Core.getBedRuleBreachReason().getReasonForPrivateBedAllocationComment());
                }
                if (Boolean.TRUE.equals(form.getGlobalContext().Core.getBedRuleBreachReason().getIsOohAllocationValidated()))
                {
                    wardStay.setReasonAdmittingOutsideHours(form.getGlobalContext().Core.getBedRuleBreachReason().getReasonForAdmissionOutOfOpeningHours());
                    wardStay.setReasonAdmittingOutsideHoursComment(form.getGlobalContext().Core.getBedRuleBreachReason().getReasonForAdmissionOohComment());
                }
                if (Boolean.TRUE.equals(form.getGlobalContext().Core.getBedRuleBreachReason().getIsMixingGenderBayValidated()))
                {
                    wardStay.setReasonGenderBreach(form.getGlobalContext().Core.getBedRuleBreachReason().getReasonForMixingBayGender());
                    wardStay.setReasonGenderBreachComment(form.getGlobalContext().Core.getBedRuleBreachReason().getReasonForMixingBayGenderComment());
                }
            }
        }
    }

    return wardStay;
}
项目:openMAXIMS    文件:Logic.java   
public void initialize(CALLINGFORM callingForm)
{   
    //WDEV-18142
    form.ccConsultant().initializeResponsibleHcp(MosType.HCP, true, form.qmbService().getValue(), null);//.initializeConsultantResponsibleHcp(MosType.MEDIC, MedicGrade.CONS, null);
    //WDEV-20894
    if (form.qmbService().getValue() != null && form.cmbFunction().getValue() != null)
    {
        form.ccConsultant().initializeResponsibleHcp(MosType.HCP, true, form.qmbService().getValue(), form.cmbFunction().getValue().getFunction());
    }

    form.getLocalContext().setCurrentAwaitingClinicalInformationVo(null);
    form.getLocalContext().setContractConfigurations(null); //WDEV-18904
    form.getGlobalContext().RefMan.setAwaitingClinicalInfo(null);
    form.getGlobalContext().RefMan.setAwaitingClinicalInfoBoolean(null);
    form.getLocalContext().setbRTTBreachDateInThePastAcknowledged(null); //WDEV-23904
    //wdev-12430
    form.cmbSOR().clear();
    SourceOfReferralCollection tempVoColl = ims.core.vo.lookups.LookupHelper.getSourceOfReferral(domain.getLookupService());
    if(tempVoColl != null)
        for(int i = 0;i < tempVoColl.size();i++ )
        {
            if(tempVoColl.get(i) != null 
                && (tempVoColl.get(i).equals(SourceOfReferral.GP) || tempVoColl.get(i).equals(SourceOfReferral.AHP)
                || tempVoColl.get(i).equals(SourceOfReferral.TRANSFER) || tempVoColl.get(i).equals(SourceOfReferral.SELF) || tempVoColl.get(i).equals(SourceOfReferral.CONSULTANT) ||  tempVoColl.get(i).equals(SourceOfReferral.NATIONAL_SCREENING)))  //wdev-20417
                form.cmbSOR().newRow((SourceOfReferral)tempVoColl.get(i),tempVoColl.get(i).getText());
        }
    //------------------
    //form.lblProcedure().setVisible(ConfigFlag.GEN.CREATE_ICP_ON_ACCEPTANCE_OF_REFERRAL.getValue());
    //form.qmbProcedure().setVisible(ConfigFlag.GEN.CREATE_ICP_ON_ACCEPTANCE_OF_REFERRAL.getValue());


    // WDEV-12866
    // Use the new function to list active Contracts for a specific location
    //      ContractConfigForReferralDetailsComponentVoCollection contracts = domain.listActiveContracts(domain.getOrganisationByLocation(engine.getCurrentLocation().getID()));
    ContractConfigForReferralDetailsComponentVoCollection contracts = domain.listActiveContractsForLocation((LocationRefVo) engine.getCurrentLocation());
    form.getLocalContext().setContractConfigurations(contracts);    //WDEV-18904
    for (int i = 0; contracts != null && i < contracts.size(); i++)
    {
        form.cmbContract().newRow(contracts.get(i), contracts.get(i).getContractName());
    }
    if (contracts != null && contracts.size() == 1)
        form.cmbContract().setValue(contracts.get(0));

    loadLocations();

    /*ReferralServiceFullVo services = domain.getReferralServices();
    if (services != null && services.getReferralServicesIsNotNull())
    {
        for (ServiceShortVo service : services.getReferralServices())
        {
            form.qmbService().newRow(service, service.getServiceName());
        }
    }*/
    clearControlsOnInitialize();

    //wdev-13647
    form.cmbNearestTreatmentCentreLocation().setVisible(ConfigFlag.UI.REFERRAL_DETAILS_DISPLAY_NEAREST_TREATMENT_CENTRE.getValue());
    //form.lblCentreLocation().setVisible(ConfigFlag.UI.REFERRAL_DETAILS_DISPLAY_NEAREST_TREATMENT_CENTRE.getValue()); //WDEV-18142 
    form.lblNearestTreatment().setVisible(ConfigFlag.UI.REFERRAL_DETAILS_DISPLAY_NEAREST_TREATMENT_CENTRE.getValue());
    if(Boolean.TRUE.equals(ConfigFlag.UI.REFERRAL_DETAILS_DISPLAY_NEAREST_TREATMENT_CENTRE.getValue()))
    {
        getAndPopulateNearestTreatmentCenterLocation();
    }
    //---------

    form.cmbCategory().setValue((form.getGlobalContext().Core.getPatientShort() != null && form.getGlobalContext().Core.getPatientShort().getPatientCategory() != null) ? form.getGlobalContext().Core.getPatientShort().getPatientCategory() : PatientStatus.NHS);

    form.getLocalContext().setAHPInfo(null);
    form.getLocalContext().setGPInfo(null);
    form.getLocalContext().setreferralVo(null);
    form.getLocalContext().setcallingForm(callingForm);
    form.getLocalContext().setTransferInfo(null);   
    updateControlState(false);

}
项目:openMAXIMS    文件:Logic.java   
public ConsMediaAndCategory(ConsultationMediaType consMedia, PatientStatus refCategory)
{
    this.consMedia = consMedia;
    this.refCategory = refCategory;

}
项目:openMAXIMS    文件:Logic.java   
public PatientStatus getCategory()
{
    return refCategory;
}