Java 类ims.core.vo.domain.ConsultantStayVoAssembler 实例源码

项目:openMAXIMS    文件:InpatientEpisodeMaintenanceImpl.java   
@Override
public void rIEConsultantStay(ConsultantStayVo stay, DischargedEpisodeMaintenanceVo dischargedEpisode) throws StaleObjectException{
    DomainFactory factory = getDomainFactory();
    ConsultantStay stayDom = ConsultantStayVoAssembler.extractConsultantStay(factory, stay);
    stayDom.setIsRIE(true);
    factory.save(stayDom);

    if(dischargedEpisode != null)
    {
        DischargedEpisode episodeDom = (DischargedEpisode) factory.getDomainObject(DischargedEpisode.class, dischargedEpisode.getID_DischargedEpisode());
        episodeDom.getAdmissionDetail().setCodingStatus(getDomLookup(CodingStatus.FORREVIEW));
        factory.save(episodeDom);
    }
}
项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
    if (admission == null)
        throw new CodingRuntimeException("Admission Details parameter is mandatory.");

    if (careSpell == null)
        throw new CodingRuntimeException("Care Spell parameter is mandatory.");

    if (catsReferral == null)
        throw new CodingRuntimeException("Cats Referral parameter is mandatory.");


    PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
    catsReferral.setJourney(journey);

    @SuppressWarnings("rawtypes")
    HashMap domMap = new HashMap();
    AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
    CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
    CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
    domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());

    getDomainFactory().save(domAdmissionDetail);
    getDomainFactory().save(domCareSpell);
    getDomainFactory().save(domCatsReferral);

    InpatientEpisode inpatEpisode = new InpatientEpisode();
    inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
    inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
    inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
    inpatEpisode.setEstDischargeDate(null);
    inpatEpisode.setWardType(domAdmissionDetail.getWardType());

    if (wardStay != null)
        inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
    if (consultant != null)
        inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));

    BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);   
    if(doBedSpaceState != null)
    {
        doBedSpaceState.setInpatientEpisode(inpatEpisode);  
        inpatEpisode.setBed(doBedSpaceState);
        inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
    }

    if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
    {
        Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
        if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
        {
            inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
        }
    }

    getDomainFactory().save(inpatEpisode);

    return null;
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
    if (admission == null)
        throw new CodingRuntimeException("Admission Details parameter is mandatory.");

    if (careSpell == null)
        throw new CodingRuntimeException("Care Spell parameter is mandatory.");

    if (catsReferral == null)
        throw new CodingRuntimeException("Cats Referral parameter is mandatory.");


    PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
    catsReferral.setJourney(journey);

    @SuppressWarnings("rawtypes")
    HashMap domMap = new HashMap();
    AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
    CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
    CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
    domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());

    getDomainFactory().save(domAdmissionDetail);
    getDomainFactory().save(domCareSpell);
    getDomainFactory().save(domCatsReferral);

    InpatientEpisode inpatEpisode = new InpatientEpisode();
    inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
    inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
    inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
    inpatEpisode.setEstDischargeDate(null);
    inpatEpisode.setWardType(domAdmissionDetail.getWardType());

    if (wardStay != null)
        inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
    if (consultant != null)
        inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));

    BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);   
    if(doBedSpaceState != null)
    {
        doBedSpaceState.setInpatientEpisode(inpatEpisode);  
        inpatEpisode.setBed(doBedSpaceState);
        inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
    }

    if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
    {
        Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
        if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
        {
            inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
        }
    }

    getDomainFactory().save(inpatEpisode);

    return null;
}
项目:openmaxims-linux    文件:BedAdmissionComponentImpl.java   
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
    if (admission == null)
        throw new CodingRuntimeException("Admission Details parameter is mandatory.");

    if (careSpell == null)
        throw new CodingRuntimeException("Care Spell parameter is mandatory.");

    if (catsReferral == null)
        throw new CodingRuntimeException("Cats Referral parameter is mandatory.");


    PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
    catsReferral.setJourney(journey);

    @SuppressWarnings("rawtypes")
    HashMap domMap = new HashMap();
    AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
    CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
    CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
    domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());

    getDomainFactory().save(domAdmissionDetail);
    getDomainFactory().save(domCareSpell);
    getDomainFactory().save(domCatsReferral);

    InpatientEpisode inpatEpisode = new InpatientEpisode();
    inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
    inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
    inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
    inpatEpisode.setEstDischargeDate(null);
    inpatEpisode.setWardType(domAdmissionDetail.getWardType());

    if (wardStay != null)
        inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
    if (consultant != null)
        inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));

    BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);   
    if(doBedSpaceState != null)
    {
        doBedSpaceState.setInpatientEpisode(inpatEpisode);  
        inpatEpisode.setBed(doBedSpaceState);
        inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
    }

    if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
    {
        Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
        if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
        {
            inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
        }
    }

    getDomainFactory().save(inpatEpisode);

    return null;
}