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

项目:AvoinApotti    文件:OPDEDClinicNotesImpl.java   
public CareContextShortVoCollection listOPEDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare) {

    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDErectDysfxn opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDErectDysfxn domOPD = (OPDErectDysfxn) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());

        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:AvoinApotti    文件:OPDSpasticityAssessImpl.java   
public CareContextShortVoCollection listOPDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare)
{
    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDSpasticityAssessTreat opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDSpasticityAssessTreat domOPD = (OPDSpasticityAssessTreat) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());
        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:AvoinApotti    文件:CareSpellDialogImpl.java   
public CareContextVo getCareContextFromPasEvent(PASEventRefVo pasEvent)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.id", pasEvent.getID_PASEvent());

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextVoAssembler.create(careContext);
    }

    return null;

}
项目:AvoinApotti    文件:ReferralDetailsComponentImpl.java   
private EpisodeofCareShortVo updateEpisodeOfCareSpecialty(CatsReferralWizardVo catsReferralVo, ReferralLetterDetailsVo referralDetailsVo, DomainFactory factory) throws StaleObjectException
{
    CareContextVo voCC = CareContextVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, catsReferralVo.getCareContext().getID_CareContext()));
    ServiceVo voServ = ServiceVoAssembler.create((ims.core.clinical.domain.objects.Service) getDomainFactory().getDomainObject(ims.core.clinical.domain.objects.Service.class, referralDetailsVo.getService().getID_Service()));

    EpisodeOfCare doEOC = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, voCC.getEpisodeOfCare().getID_EpisodeOfCare());
    if (doEOC != null)
    {
        //WDEV-11535 - if referral service.specialty is null set it back to DAD
        Specialty spec = null;
        if(voServ.getSpecialty() == null)
            spec = Specialty.DAD;
        else
            spec = voServ.getSpecialty();

        doEOC.setSpecialty(getDomLookup(spec));         
        factory.save(doEOC);

        return EpisodeofCareShortVoAssembler.create(doEOC);
    }

    return null;
}
项目:openMAXIMS    文件:OPDEDClinicNotesImpl.java   
public CareContextShortVoCollection listOPEDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare) {

    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDErectDysfxn opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDErectDysfxn domOPD = (OPDErectDysfxn) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());

        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:openMAXIMS    文件:OPDSpasticityAssessImpl.java   
public CareContextShortVoCollection listOPDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare)
{
    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDSpasticityAssessTreat opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDSpasticityAssessTreat domOPD = (OPDSpasticityAssessTreat) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());
        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextVo getCareContextFromPasEvent(PASEventRefVo pasEvent)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.id", pasEvent.getID_PASEvent());

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextVoAssembler.create(careContext);
    }

    return null;

}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
private EpisodeofCareShortVo updateEpisodeOfCareSpecialty(CatsReferralWizardVo catsReferralVo, ReferralLetterDetailsVo referralDetailsVo, DomainFactory factory) throws StaleObjectException
{
    CareContextVo voCC = CareContextVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, catsReferralVo.getCareContext().getID_CareContext()));
    ServiceVo voServ = ServiceVoAssembler.create((ims.core.clinical.domain.objects.Service) getDomainFactory().getDomainObject(ims.core.clinical.domain.objects.Service.class, referralDetailsVo.getService().getID_Service()));

    EpisodeOfCare doEOC = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, voCC.getEpisodeOfCare().getID_EpisodeOfCare());
    if (doEOC != null)
    {
        //WDEV-11535 - if referral service.specialty is null set it back to DAD
        Specialty spec = null;
        if(voServ.getSpecialty() == null)
            spec = Specialty.DAD;
        else
            spec = voServ.getSpecialty();

        doEOC.setSpecialty(getDomLookup(spec));         
        factory.save(doEOC);

        return EpisodeofCareShortVoAssembler.create(doEOC);
    }

    return null;
}
项目:openMAXIMS    文件:OPDEDClinicNotesImpl.java   
public CareContextShortVoCollection listOPEDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare) {

    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDErectDysfxn opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDErectDysfxn domOPD = (OPDErectDysfxn) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());

        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:openMAXIMS    文件:OPDSpasticityAssessImpl.java   
public CareContextShortVoCollection listOPDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare)
{
    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDSpasticityAssessTreat opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDSpasticityAssessTreat domOPD = (OPDSpasticityAssessTreat) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());
        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextVo getCareContextFromPasEvent(PASEventRefVo pasEvent)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.id", pasEvent.getID_PASEvent());

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextVoAssembler.create(careContext);
    }

    return null;

}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
private EpisodeofCareShortVo updateEpisodeOfCareSpecialty(CatsReferralWizardVo catsReferralVo, ReferralLetterDetailsVo referralDetailsVo, DomainFactory factory) throws StaleObjectException
{
    CareContextVo voCC = CareContextVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, catsReferralVo.getCareContext().getID_CareContext()));
    ServiceVo voServ = ServiceVoAssembler.create((ims.core.clinical.domain.objects.Service) getDomainFactory().getDomainObject(ims.core.clinical.domain.objects.Service.class, referralDetailsVo.getService().getID_Service()));

    EpisodeOfCare doEOC = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, voCC.getEpisodeOfCare().getID_EpisodeOfCare());
    if (doEOC != null)
    {
        //WDEV-11535 - if referral service.specialty is null set it back to DAD
        Specialty spec = null;
        if(voServ.getSpecialty() == null)
            spec = Specialty.DAD;
        else
            spec = voServ.getSpecialty();

        doEOC.setSpecialty(getDomLookup(spec));         
        factory.save(doEOC);

        return EpisodeofCareShortVoAssembler.create(doEOC);
    }

    return null;
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargedEpisodeVo getDischargedEpisodeDetails(CareContextRefVo ccRefVo, PatientRefVo voPatRefVo)
{
    DomainFactory factory = getDomainFactory();
    CareContextVo voCC = CareContextVoAssembler.create((CareContext)factory.getDomainObject(CareContext.class, ccRefVo.getID_CareContext()));

    if (voCC.getPasEvent() == null)
    {
        return null;
    }

    String hql = "from DischargedEpisode de " + 
    " where de.pasEvent.patient.id = :patId " + 
    " and de.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("patId");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(voPatRefVo.getID_Patient());
    values.add(voCC.getPasEvent().getID_PASEvent());

    List<?> l = factory.find(hql, labels, values);      
    if (l != null && l.size() > 0)
    {
        if (l.size() > 1)
            throw new DomainRuntimeException("Duplicate data found for Patient and PasEvent");

        DischargedEpisodeVoCollection  voColl = DischargedEpisodeVoAssembler.createDischargedEpisodeVoCollectionFromDischargedEpisode(l);
        return voColl.get(0);
    }
    return null;
}
项目:openmaxims-linux    文件:OPDEDClinicNotesImpl.java   
public CareContextShortVoCollection listOPEDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare) {

    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDErectDysfxn opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDErectDysfxn domOPD = (OPDErectDysfxn) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());

        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:openmaxims-linux    文件:OPDSpasticityAssessImpl.java   
public CareContextShortVoCollection listOPDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare)
{
    DomainFactory factory = getDomainFactory();
    List OPDList  = factory.find(" from OPDSpasticityAssessTreat opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc",
            new String[]{"ecId"},
            new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()});

    CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
    for (int x = 0; x < OPDList.size(); x++)
    {
        OPDSpasticityAssessTreat domOPD = (OPDSpasticityAssessTreat) OPDList.get(x);

        CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext());
        voCareContextList.add(voCareContext);
    }

    return voCareContextList;

}
项目:openmaxims-linux    文件:CareSpellDialogImpl.java   
public CareContextVo getCareContextFromPasEvent(PASEventRefVo pasEvent)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.id", pasEvent.getID_PASEvent());

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextVoAssembler.create(careContext);
    }

    return null;

}
项目:AvoinApotti    文件:CarePlanOverviewImpl.java   
private Integer getPatientId(CareContextRefVo voCurrentCareContext) {

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, voCurrentCareContext.getID_CareContext());
    CareContextVo voCareContext = CareContextVoAssembler.create(doCareContext);
    CareSpell doCareSpell = (CareSpell)factory.getDomainObject(CareSpell.class, voCareContext.getEpisodeOfCare().getCareSpell().getID_CareSpell());
    CareSpellVo voCareSpell = CareSpellVoAssembler.create(doCareSpell);
    return voCareSpell.getPatient().getID_Patient();
}
项目:AvoinApotti    文件:CopyCarePlansImpl.java   
private Integer getPatientId(CareContextRefVo voCurrentCareContext)
{

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, voCurrentCareContext.getID_CareContext());
    CareContextVo voCareContext = CareContextVoAssembler.create(doCareContext);
    CareSpell doCareSpell = (CareSpell) factory.getDomainObject(CareSpell.class, voCareContext.getEpisodeOfCare().getCareSpell().getID_CareSpell());
    CareSpellVo voCareSpell = CareSpellVoAssembler.create(doCareSpell);
    return voCareSpell.getPatient().getID_Patient();
}
项目:AvoinApotti    文件:CareSpellDialogImpl.java   
public CareContextVo saveCareContext(CareContextVo careContext) throws StaleObjectException
{
    if (careContext == null  || !careContext.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    CareContext doCareContext = CareContextVoAssembler.extractCareContext(factory, careContext);

    //WDEV-10231 - add any new status record to history
    if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)    
        doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());

    factory.save(doCareContext);
    return CareContextVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:CareContextSelectDialogImpl.java   
public CareContextVo updateCareContextwithOrderingHospital(CareContextRefVo careContext, LocSiteRefVo locSite) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    CareContext domCareContext = (CareContext) factory.getDomainObject(careContext);
    LocSite domOrderingHosp = (LocSite)factory.getDomainObject(locSite);
    domCareContext.setOrderingHospital(domOrderingHosp);
    factory.save(domCareContext);
    return CareContextVoAssembler.create(domCareContext);
}
项目:AvoinApotti    文件:ADTAdmissionDetailsComponentImpl.java   
public CareContextVo getCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null || careContextRef.getID_CareContext()==null)
        throw new CodingRuntimeException("Cannot get CareContext value on null careContextRef.");

    DomainFactory factory = getDomainFactory();
    CareContext domCareContext=(CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());
    return CareContextVoAssembler.create(domCareContext);
}
项目:AvoinApotti    文件:ADTPatientAdmissionImpl.java   
public CareContextVo getCareContextByCareContextRef(CareContextRefVo careContextRef)
{
    if(careContextRef == null || careContextRef.getID_CareContext()==null)
        throw new CodingRuntimeException("Cannot get CareContext value on null careContextRef.");

    DomainFactory factory = getDomainFactory();
    CareContext domCareContext=(CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());
    return CareContextVoAssembler.create(domCareContext);
}
项目:AvoinApotti    文件:Patient_SummaryImpl.java   
public CareContextVo getCareContextById(CareContextRefVo careRef)
{
    if (careRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careRef.getID_CareContext());
    return CareContextVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:DemoPatientReferralListImpl.java   
public CareContextVo getCareContext(CareContextRefVo careContextRefVo) 
{
    if (careContextRefVo == null)
        return null;

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, careContextRefVo.getID_CareContext()); 
    return CareContextVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:PatientAssessmentSearchImpl.java   
public CareContextShortVo getCareContextShortVoByRefVo(CareContextRefVo refVoCareContext) 
{
    //WDEV-12009
    if(refVoCareContext == null || refVoCareContext.getID_CareContext() == null)
        return null;

    DomainFactory factory = this.getDomainFactory();
    CareContext cc = (CareContext)factory.getDomainObject(CareContext.class, refVoCareContext.getID_CareContext());
    return CareContextVoAssembler.create(cc);
}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DateTime getAdmissionDateTimeFromAdmissionDetail(CareContextRefVo ccRefVo, PatientRefVo voPatRefVo)
{
    DomainFactory factory = getDomainFactory();
    CareContextVo voCC = CareContextVoAssembler.create((CareContext)factory.getDomainObject(CareContext.class, ccRefVo.getID_CareContext()));

    if (voCC.getPasEvent() == null)
    {
        return null;
    }

    String hql = "from AdmissionDetail ad " + 
    " where ad.pasEvent.patient.id = :patId " + 
    " and ad.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("patId");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(voPatRefVo.getID_Patient());
    values.add(voCC.getPasEvent().getID_PASEvent());

    List<?> l = factory.find(hql, labels, values);      
    if (l != null && l.size() > 0)
    {
        if (l.size() > 1)
            throw new DomainRuntimeException("Duplicate data found for Patient and PasEvent");

        AdmissionDetailVoCollection  voColl = AdmissionDetailVoAssembler.createAdmissionDetailVoCollectionFromAdmissionDetail(l);
        return voColl.get(0).getAdmissionDateTime();
    }
    return null;
}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargedEpisodeVo getDischargedEpisodeDetails(CareContextRefVo ccRefVo, PatientRefVo voPatRefVo)
{
    DomainFactory factory = getDomainFactory();
    CareContextVo voCC = CareContextVoAssembler.create((CareContext)factory.getDomainObject(CareContext.class, ccRefVo.getID_CareContext()));

    if (voCC.getPasEvent() == null)
    {
        return null;
    }

    String hql = "from DischargedEpisode de " + 
    " where de.pasEvent.patient.id = :patId " + 
    " and de.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("patId");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(voPatRefVo.getID_Patient());
    values.add(voCC.getPasEvent().getID_PASEvent());

    List<?> l = factory.find(hql, labels, values);      
    if (l != null && l.size() > 0)
    {
        if (l.size() > 1)
            throw new DomainRuntimeException("Duplicate data found for Patient and PasEvent");

        DischargedEpisodeVoCollection  voColl = DischargedEpisodeVoAssembler.createDischargedEpisodeVoCollectionFromDischargedEpisode(l);
        return voColl.get(0);
    }
    return null;
}
项目:AvoinApotti    文件:PatientSummaryImpl.java   
public CareContextVo getCareContextById(CareContextRefVo careRef) 
{
    if(careRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, careRef.getID_CareContext());
    return CareContextVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:CarePlanOverviewImpl.java   
private Integer getPatientId(CareContextRefVo voCurrentCareContext) {

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, voCurrentCareContext.getID_CareContext());
    CareContextVo voCareContext = CareContextVoAssembler.create(doCareContext);
    CareSpell doCareSpell = (CareSpell)factory.getDomainObject(CareSpell.class, voCareContext.getEpisodeOfCare().getCareSpell().getID_CareSpell());
    CareSpellVo voCareSpell = CareSpellVoAssembler.create(doCareSpell);
    return voCareSpell.getPatient().getID_Patient();
}
项目:openMAXIMS    文件:CopyCarePlansImpl.java   
private Integer getPatientId(CareContextRefVo voCurrentCareContext)
{

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, voCurrentCareContext.getID_CareContext());
    CareContextVo voCareContext = CareContextVoAssembler.create(doCareContext);
    CareSpell doCareSpell = (CareSpell) factory.getDomainObject(CareSpell.class, voCareContext.getEpisodeOfCare().getCareSpell().getID_CareSpell());
    CareSpellVo voCareSpell = CareSpellVoAssembler.create(doCareSpell);
    return voCareSpell.getPatient().getID_Patient();
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextVo saveCareContext(CareContextVo careContext) throws StaleObjectException
{
    if (careContext == null  || !careContext.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    CareContext doCareContext = CareContextVoAssembler.extractCareContext(factory, careContext);

    //WDEV-10231 - add any new status record to history
    if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)    
        doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());

    factory.save(doCareContext);
    return CareContextVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:CareContextSelectDialogImpl.java   
public CareContextVo updateCareContextwithOrderingHospital(CareContextRefVo careContext, LocSiteRefVo locSite) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    CareContext domCareContext = (CareContext) factory.getDomainObject(careContext);
    LocSite domOrderingHosp = (LocSite)factory.getDomainObject(locSite);
    domCareContext.setOrderingHospital(domOrderingHosp);
    factory.save(domCareContext);
    return CareContextVoAssembler.create(domCareContext);
}
项目:openMAXIMS    文件:ADTAdmissionDetailsComponentImpl.java   
public CareContextVo getCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null || careContextRef.getID_CareContext()==null)
        throw new CodingRuntimeException("Cannot get CareContext value on null careContextRef.");

    DomainFactory factory = getDomainFactory();
    CareContext domCareContext=(CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());
    return CareContextVoAssembler.create(domCareContext);
}
项目:openMAXIMS    文件:ADTPatientAdmissionImpl.java   
public CareContextVo getCareContextByCareContextRef(CareContextRefVo careContextRef)
{
    if(careContextRef == null || careContextRef.getID_CareContext()==null)
        throw new CodingRuntimeException("Cannot get CareContext value on null careContextRef.");

    DomainFactory factory = getDomainFactory();
    CareContext domCareContext=(CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());
    return CareContextVoAssembler.create(domCareContext);
}
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public CareContextVo getCareContextById(CareContextRefVo careRef)
{
    if (careRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careRef.getID_CareContext());
    return CareContextVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:DemoPatientReferralListImpl.java   
public CareContextVo getCareContext(CareContextRefVo careContextRefVo) 
{
    if (careContextRefVo == null)
        return null;

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, careContextRefVo.getID_CareContext()); 
    return CareContextVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:PatientAssessmentSearchImpl.java   
public CareContextShortVo getCareContextShortVoByRefVo(CareContextRefVo refVoCareContext) 
{
    //WDEV-12009
    if(refVoCareContext == null || refVoCareContext.getID_CareContext() == null)
        return null;

    DomainFactory factory = this.getDomainFactory();
    CareContext cc = (CareContext)factory.getDomainObject(CareContext.class, refVoCareContext.getID_CareContext());
    return CareContextVoAssembler.create(cc);
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DateTime getAdmissionDateTimeFromAdmissionDetail(CareContextRefVo ccRefVo, PatientRefVo voPatRefVo)
{
    DomainFactory factory = getDomainFactory();
    CareContextVo voCC = CareContextVoAssembler.create((CareContext)factory.getDomainObject(CareContext.class, ccRefVo.getID_CareContext()));

    if (voCC.getPasEvent() == null)
    {
        return null;
    }

    String hql = "from AdmissionDetail ad " + 
    " where ad.pasEvent.patient.id = :patId " + 
    " and ad.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("patId");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(voPatRefVo.getID_Patient());
    values.add(voCC.getPasEvent().getID_PASEvent());

    List<?> l = factory.find(hql, labels, values);      
    if (l != null && l.size() > 0)
    {
        if (l.size() > 1)
            throw new DomainRuntimeException("Duplicate data found for Patient and PasEvent");

        AdmissionDetailVoCollection  voColl = AdmissionDetailVoAssembler.createAdmissionDetailVoCollectionFromAdmissionDetail(l);
        return voColl.get(0).getAdmissionDateTime();
    }
    return null;
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargedEpisodeVo getDischargedEpisodeDetails(CareContextRefVo ccRefVo, PatientRefVo voPatRefVo)
{
    DomainFactory factory = getDomainFactory();
    CareContextVo voCC = CareContextVoAssembler.create((CareContext)factory.getDomainObject(CareContext.class, ccRefVo.getID_CareContext()));

    if (voCC.getPasEvent() == null)
    {
        return null;
    }

    String hql = "from DischargedEpisode de " + 
    " where de.pasEvent.patient.id = :patId " + 
    " and de.pasEvent.id = :eventId ";

    ArrayList<String> labels = new ArrayList<String>();
    labels.add("patId");
    labels.add("eventId");

    ArrayList<Object> values = new ArrayList<Object>();
    values.add(voPatRefVo.getID_Patient());
    values.add(voCC.getPasEvent().getID_PASEvent());

    List<?> l = factory.find(hql, labels, values);      
    if (l != null && l.size() > 0)
    {
        if (l.size() > 1)
            throw new DomainRuntimeException("Duplicate data found for Patient and PasEvent");

        DischargedEpisodeVoCollection  voColl = DischargedEpisodeVoAssembler.createDischargedEpisodeVoCollectionFromDischargedEpisode(l);
        return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public CareContextVo getCareContextById(CareContextRefVo careRef) 
{
    if(careRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, careRef.getID_CareContext());
    return CareContextVoAssembler.create(doCareContext);
}