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

项目:AvoinApotti    文件:PresentingProblemsAndInterventionsImpl.java   
public PatientProblemVoCollection listPatientProblemsByCareContext(CareContextRefVo careContext)
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("No Care context Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem p where p.careContext.id = :careContextId order by p.specialty.text, p.problem.pCName", new String[]{"careContextId"},new Object[]{careContext.getID_CareContext()});

    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
/**
* listByClinicalContact
*/
public ims.core.vo.PatientProblemVoCollection listByClinicalContact(ims.core.admin.vo.ClinicalContactRefVo clinicalcontact)
{
    if(clinicalcontact == null)
        throw new DomainRuntimeException("Invalid clinical contact");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.clinicalContact.id = " + clinicalcontact.getID_ClinicalContact());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
/**
* Saves a patientProblem
*/
public ims.core.vo.PatientProblemVo save(ims.core.vo.PatientProblemVo voPatientProblem) throws ims.domain.exceptions.StaleObjectException
{
    if (!voPatientProblem.isValidated())
        throw new DomainRuntimeException("Patient problem has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientProblem domProblem = PatientProblemVoAssembler.extractPatientProblem(factory, voPatientProblem);
    if(domProblem.getId() == null)
        domProblem.setIsActive(Boolean.TRUE);

    factory.save(domProblem);        
    return PatientProblemVoAssembler.create(domProblem);
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
/**
* Get a patient Problem
*/
public PatientProblemVo get(PatientProblemRefVo patientProblem) 
{
    if(patientProblem == null)
        throw new DomainRuntimeException("Invalid patient problem record to get");

    return PatientProblemVoAssembler.create((PatientProblem)getDomainFactory().getDomainObject(PatientProblem.class, patientProblem.getID_PatientProblem()));
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listByPatient(PatientRefVo patient) 
{
    if(patient == null || patient.getID_Patient() == null)
        throw new DomainRuntimeException("No Patient Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem problem where problem.careContext.episodeOfCare.careSpell.patient.id = :patientId and problem.isActive = :active ", new String[]{"patientId","active"},new Object[]{patient.getID_Patient(), Boolean.TRUE});
    if(problems != null)
        return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 

    return null;
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareContext(CareContextRefVo careContextRefVo) 
{
    if(careContextRefVo == null)
        throw new DomainRuntimeException("Invalid Care Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.id = " + careContextRefVo.getID_CareContext());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareSpell(CareSpellRefVo careSpellRefVo) 
{
    if(careSpellRefVo == null)
        throw new DomainRuntimeException("Invalid Care Spell Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.episodeOfCare.careSpell.id = " + careSpellRefVo.getID_CareSpell());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCarePlusUnresolved(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    if(episodeOfCareRefVo == null)
        throw new DomainRuntimeException("Invalid Episode Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where (p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare() + ")");
    hql.append(" or (p.isResolved = " + Boolean.FALSE + ")");
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PresentingProblemsAndInterventionsImpl.java   
public PatientProblemVoCollection listPatientProblemsByCareContext(CareContextRefVo careContext)
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("No Care context Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem p where p.careContext.id = :careContextId order by p.specialty.text, p.problem.pCName", new String[]{"careContextId"},new Object[]{careContext.getID_CareContext()});

    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
/**
* listByClinicalContact
*/
public ims.core.vo.PatientProblemVoCollection listByClinicalContact(ims.core.admin.vo.ClinicalContactRefVo clinicalcontact)
{
    if(clinicalcontact == null)
        throw new DomainRuntimeException("Invalid clinical contact");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.clinicalContact.id = " + clinicalcontact.getID_ClinicalContact());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
/**
* Saves a patientProblem
*/
public ims.core.vo.PatientProblemVo save(ims.core.vo.PatientProblemVo voPatientProblem) throws ims.domain.exceptions.StaleObjectException
{
    if (!voPatientProblem.isValidated())
        throw new DomainRuntimeException("Patient problem has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientProblem domProblem = PatientProblemVoAssembler.extractPatientProblem(factory, voPatientProblem);
    if(domProblem.getId() == null)
        domProblem.setIsActive(Boolean.TRUE);

    factory.save(domProblem);        
    return PatientProblemVoAssembler.create(domProblem);
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
/**
* Get a patient Problem
*/
public PatientProblemVo get(PatientProblemRefVo patientProblem) 
{
    if(patientProblem == null)
        throw new DomainRuntimeException("Invalid patient problem record to get");

    return PatientProblemVoAssembler.create((PatientProblem)getDomainFactory().getDomainObject(PatientProblem.class, patientProblem.getID_PatientProblem()));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listByPatient(PatientRefVo patient) 
{
    if(patient == null || patient.getID_Patient() == null)
        throw new DomainRuntimeException("No Patient Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem problem where problem.careContext.episodeOfCare.careSpell.patient.id = :patientId and problem.isActive = :active ", new String[]{"patientId","active"},new Object[]{patient.getID_Patient(), Boolean.TRUE});
    if(problems != null)
        return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 

    return null;
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareContext(CareContextRefVo careContextRefVo) 
{
    if(careContextRefVo == null)
        throw new DomainRuntimeException("Invalid Care Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.id = " + careContextRefVo.getID_CareContext());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareSpell(CareSpellRefVo careSpellRefVo) 
{
    if(careSpellRefVo == null)
        throw new DomainRuntimeException("Invalid Care Spell Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.episodeOfCare.careSpell.id = " + careSpellRefVo.getID_CareSpell());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCarePlusUnresolved(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    if(episodeOfCareRefVo == null)
        throw new DomainRuntimeException("Invalid Episode Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where (p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare() + ")");
    hql.append(" or (p.isResolved = " + Boolean.FALSE + ")");
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PresentingProblemsAndInterventionsImpl.java   
public PatientProblemVoCollection listPatientProblemsByCareContext(CareContextRefVo careContext)
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("No Care context Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem p where p.careContext.id = :careContextId order by p.specialty.text, p.problem.pCName", new String[]{"careContextId"},new Object[]{careContext.getID_CareContext()});

    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
/**
* listByClinicalContact
*/
public ims.core.vo.PatientProblemVoCollection listByClinicalContact(ims.core.admin.vo.ClinicalContactRefVo clinicalcontact)
{
    if(clinicalcontact == null)
        throw new DomainRuntimeException("Invalid clinical contact");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.clinicalContact.id = " + clinicalcontact.getID_ClinicalContact());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
/**
* Saves a patientProblem
*/
public ims.core.vo.PatientProblemVo save(ims.core.vo.PatientProblemVo voPatientProblem) throws ims.domain.exceptions.StaleObjectException
{
    if (!voPatientProblem.isValidated())
        throw new DomainRuntimeException("Patient problem has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientProblem domProblem = PatientProblemVoAssembler.extractPatientProblem(factory, voPatientProblem);
    if(domProblem.getId() == null)
        domProblem.setIsActive(Boolean.TRUE);

    factory.save(domProblem);        
    return PatientProblemVoAssembler.create(domProblem);
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
/**
* Get a patient Problem
*/
public PatientProblemVo get(PatientProblemRefVo patientProblem) 
{
    if(patientProblem == null)
        throw new DomainRuntimeException("Invalid patient problem record to get");

    return PatientProblemVoAssembler.create((PatientProblem)getDomainFactory().getDomainObject(PatientProblem.class, patientProblem.getID_PatientProblem()));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listByPatient(PatientRefVo patient) 
{
    if(patient == null || patient.getID_Patient() == null)
        throw new DomainRuntimeException("No Patient Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem problem where problem.careContext.episodeOfCare.careSpell.patient.id = :patientId and problem.isActive = :active ", new String[]{"patientId","active"},new Object[]{patient.getID_Patient(), Boolean.TRUE});
    if(problems != null)
        return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 

    return null;
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareContext(CareContextRefVo careContextRefVo) 
{
    if(careContextRefVo == null)
        throw new DomainRuntimeException("Invalid Care Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.id = " + careContextRefVo.getID_CareContext());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareSpell(CareSpellRefVo careSpellRefVo) 
{
    if(careSpellRefVo == null)
        throw new DomainRuntimeException("Invalid Care Spell Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.episodeOfCare.careSpell.id = " + careSpellRefVo.getID_CareSpell());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCarePlusUnresolved(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    if(episodeOfCareRefVo == null)
        throw new DomainRuntimeException("Invalid Episode Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where (p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare() + ")");
    hql.append(" or (p.isResolved = " + Boolean.FALSE + ")");
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openmaxims-linux    文件:PresentingProblemsAndInterventionsImpl.java   
public PatientProblemVoCollection listPatientProblemsByCareContext(CareContextRefVo careContext)
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("No Care context Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem p where p.careContext.id = :careContextId order by p.specialty.text, p.problem.pCName", new String[]{"careContextId"},new Object[]{careContext.getID_CareContext()});

    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
/**
* listByClinicalContact
*/
public ims.core.vo.PatientProblemVoCollection listByClinicalContact(ims.core.admin.vo.ClinicalContactRefVo clinicalcontact)
{
    if(clinicalcontact == null)
        throw new DomainRuntimeException("Invalid clinical contact");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.clinicalContact.id = " + clinicalcontact.getID_ClinicalContact());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
/**
* Saves a patientProblem
*/
public ims.core.vo.PatientProblemVo save(ims.core.vo.PatientProblemVo voPatientProblem) throws ims.domain.exceptions.StaleObjectException
{
    if (!voPatientProblem.isValidated())
        throw new DomainRuntimeException("Patient problem has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientProblem domProblem = PatientProblemVoAssembler.extractPatientProblem(factory, voPatientProblem);
    if(domProblem.getId() == null)
        domProblem.setIsActive(Boolean.TRUE);

    factory.save(domProblem);        
    return PatientProblemVoAssembler.create(domProblem);
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
/**
* Get a patient Problem
*/
public PatientProblemVo get(PatientProblemRefVo patientProblem) 
{
    if(patientProblem == null)
        throw new DomainRuntimeException("Invalid patient problem record to get");

    return PatientProblemVoAssembler.create((PatientProblem)getDomainFactory().getDomainObject(PatientProblem.class, patientProblem.getID_PatientProblem()));
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listByPatient(PatientRefVo patient) 
{
    if(patient == null || patient.getID_Patient() == null)
        throw new DomainRuntimeException("No Patient Supplied");

    DomainFactory factory = getDomainFactory();
    List problems = factory.find("from PatientProblem problem where problem.careContext.episodeOfCare.careSpell.patient.id = :patientId and problem.isActive = :active ", new String[]{"patientId","active"},new Object[]{patient.getID_Patient(), Boolean.TRUE});
    if(problems != null)
        return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); 

    return null;
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareContext(CareContextRefVo careContextRefVo) 
{
    if(careContextRefVo == null)
        throw new DomainRuntimeException("Invalid Care Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.id = " + careContextRefVo.getID_CareContext());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByCareSpell(CareSpellRefVo careSpellRefVo) 
{
    if(careSpellRefVo == null)
        throw new DomainRuntimeException("Invalid Care Spell Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where p.isActive = TRUE and p.careContext.episodeOfCare.careSpell.id = " + careSpellRefVo.getID_CareSpell());
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCarePlusUnresolved(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    if(episodeOfCareRefVo == null)
        throw new DomainRuntimeException("Invalid Episode Context Ref");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientProblem p ");
    hql.append(" where (p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare() + ")");
    hql.append(" or (p.isResolved = " + Boolean.FALSE + ")");
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString())));
}
项目:AvoinApotti    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    List list = listPatientProblemnsRecordsByEpisodeOfCare(episodeOfCareRefVo);
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(list);
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    List list = listPatientProblemnsRecordsByEpisodeOfCare(episodeOfCareRefVo);
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(list);
}
项目:openMAXIMS    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    List list = listPatientProblemnsRecordsByEpisodeOfCare(episodeOfCareRefVo);
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(list);
}
项目:openmaxims-linux    文件:PatientProblemsImpl.java   
public PatientProblemVoCollection listProblemsByEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRefVo) 
{
    List list = listPatientProblemnsRecordsByEpisodeOfCare(episodeOfCareRefVo);
    return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(list);
}