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

项目:AvoinApotti    文件:CareContextSelectDialogImpl.java   
public ims.core.vo.CareSpellVoCollection listCareSpellsByPatient(ims.core.patient.vo.PatientRefVo patientRefVo, Date careContextDate)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List<?> careSpells = null;

    if(careContextDate != null)
        careSpells = factory.find("select careSpell from CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where (cc.startDateTime >= :ccStartDate and careSpell.patient.id = :idPatient)", new String[] {"ccStartDate","idPatient"}, new Object[] { careContextDate.getDate(), patientRefVo.getID_Patient()});
    else
        careSpells = factory.find("from CareSpell as careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] { patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:CareContextSelectDialogImpl.java   
public ims.core.vo.CareSpellVoCollection listCareSpellsByPatient(ims.core.patient.vo.PatientRefVo patientRefVo, Date careContextDate)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List<?> careSpells = null;

    if(careContextDate != null)
        careSpells = factory.find("select careSpell from CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where (cc.startDateTime >= :ccStartDate and careSpell.patient.id = :idPatient)", new String[] {"ccStartDate","idPatient"}, new Object[] { careContextDate.getDate(), patientRefVo.getID_Patient()});
    else
        careSpells = factory.find("from CareSpell as careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] { patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:CareContextSelectDialogImpl.java   
public ims.core.vo.CareSpellVoCollection listCareSpellsByPatient(ims.core.patient.vo.PatientRefVo patientRefVo, Date careContextDate)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List<?> careSpells = null;

    if(careContextDate != null)
        careSpells = factory.find("select careSpell from CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where (cc.startDateTime >= :ccStartDate and careSpell.patient.id = :idPatient)", new String[] {"ccStartDate","idPatient"}, new Object[] { careContextDate.getDate(), patientRefVo.getID_Patient()});
    else
        careSpells = factory.find("from CareSpell as careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] { patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openmaxims-linux    文件:CareContextSelectDialogImpl.java   
public ims.core.vo.CareSpellVoCollection listCareSpellsByPatient(ims.core.patient.vo.PatientRefVo patientRefVo, Date careContextDate)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List<?> careSpells = null;

    if(careContextDate != null)
        careSpells = factory.find("select careSpell from CareSpell as careSpell left join careSpell.episodes as epis left join epis.careContexts as cc where (cc.startDateTime >= :ccStartDate and careSpell.patient.id = :idPatient)", new String[] {"ccStartDate","idPatient"}, new Object[] { careContextDate.getDate(), patientRefVo.getID_Patient()});
    else
        careSpells = factory.find("from CareSpell as careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] { patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    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    文件:MDTCustomListImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo) {
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:AvoinApotti    文件:CareSpellDialogImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        

    //WDEV-10231 - add any new cc status record to the history
    maintainCareContextStatusHistory(doCareSpell);

    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public CareSpellVo getCareSpellByEpisodeOfCare(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select cs from EpisodeOfCare as eoc left join eoc.careSpell as cs";
    hsql += " where eoc.id = :id";

    List careSpell = factory.find(hsql, new String[] {"id"}, new Object[] {id.intValue()});

    return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpell).get(0);
}
项目:AvoinApotti    文件:AttendanceDetailsImpl.java   
public CareSpellVo getCareSpellByEpisodeOfCare(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select cs from EpisodeOfCare as eoc left join eoc.careSpell as cs";
    hsql += " where eoc.id = :id";

    List careSpell = factory.find(hsql, new String[] {"id"}, new Object[] {id.intValue()});

    return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpell).get(0);
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        
    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        }
项目:AvoinApotti    文件:ClinicListImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        
    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        }
项目:AvoinApotti    文件:Patient_SummaryImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo)
{
    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] { "idPatient" }, new Object[] { patientRefVo.getID_Patient() });

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:AvoinApotti    文件:Patient_SummaryImpl.java   
public CareSpellVo getCareSpellById(CareSpellRefVo careSpellRef)
{
    if (careSpellRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    return CareSpellVoAssembler.create((CareSpell) factory.getDomainObject(CareSpell.class, careSpellRef.getID_CareSpell()));
}
项目:AvoinApotti    文件:PatientSummaryImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:AvoinApotti    文件:PatientSummaryImpl.java   
public CareSpellVo getCareSpellById(CareSpellRefVo careSpellRef) 
{
    if(careSpellRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    return CareSpellVoAssembler.create((CareSpell)factory.getDomainObject(CareSpell.class, careSpellRef.getID_CareSpell()));
}
项目: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    文件:MDTCustomListImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo) {
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        

    //WDEV-10231 - add any new cc status record to the history
    maintainCareContextStatusHistory(doCareSpell);

    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public CareSpellVo getCareSpellByEpisodeOfCare(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select cs from EpisodeOfCare as eoc left join eoc.careSpell as cs";
    hsql += " where eoc.id = :id";

    List careSpell = factory.find(hsql, new String[] {"id"}, new Object[] {id.intValue()});

    return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpell).get(0);
}
项目:openMAXIMS    文件:AttendanceDetailsImpl.java   
public CareSpellVo getCareSpellByEpisodeOfCare(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select cs from EpisodeOfCare as eoc left join eoc.careSpell as cs";
    hsql += " where eoc.id = :id";

    List careSpell = factory.find(hsql, new String[] {"id"}, new Object[] {id.intValue()});

    return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpell).get(0);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        
    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        }
项目:openMAXIMS    文件:ClinicListImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        
    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        }
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo)
{
    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] { "idPatient" }, new Object[] { patientRefVo.getID_Patient() });

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public CareSpellVo getCareSpellById(CareSpellRefVo careSpellRef)
{
    if (careSpellRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    return CareSpellVoAssembler.create((CareSpell) factory.getDomainObject(CareSpell.class, careSpellRef.getID_CareSpell()));
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public CareSpellVo getCareSpellById(CareSpellRefVo careSpellRef) 
{
    if(careSpellRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    return CareSpellVoAssembler.create((CareSpell)factory.getDomainObject(CareSpell.class, careSpellRef.getID_CareSpell()));
}
项目: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    文件:MDTCustomListImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo) {
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        

    //WDEV-10231 - add any new cc status record to the history
    maintainCareContextStatusHistory(doCareSpell);

    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public CareSpellVo getCareSpellByEpisodeOfCare(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select cs from EpisodeOfCare as eoc left join eoc.careSpell as cs";
    hsql += " where eoc.id = :id";

    List careSpell = factory.find(hsql, new String[] {"id"}, new Object[] {id.intValue()});

    return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpell).get(0);
}
项目:openMAXIMS    文件:AttendanceDetailsImpl.java   
public CareSpellVo getCareSpellByEpisodeOfCare(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select cs from EpisodeOfCare as eoc left join eoc.careSpell as cs";
    hsql += " where eoc.id = :id";

    List careSpell = factory.find(hsql, new String[] {"id"}, new Object[] {id.intValue()});

    return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpell).get(0);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        
    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        }
项目:openMAXIMS    文件:ClinicListImpl.java   
public CareSpellVo saveCareSpell(CareSpellVo voCareSpell) throws StaleObjectException
{
    if (voCareSpell == null  || !voCareSpell.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");

    DomainFactory factory = getDomainFactory();
    CareSpell doCareSpell = CareSpellVoAssembler.extractCareSpell(factory, voCareSpell);        
    factory.save(doCareSpell);

    return CareSpellVoAssembler.create(doCareSpell);        }
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo)
{
    if (patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] { "idPatient" }, new Object[] { patientRefVo.getID_Patient() });

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public CareSpellVo getCareSpellById(CareSpellRefVo careSpellRef)
{
    if (careSpellRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    return CareSpellVoAssembler.create((CareSpell) factory.getDomainObject(CareSpell.class, careSpellRef.getID_CareSpell()));
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo)
{
    if(patientRefVo == null || patientRefVo.getID_Patient() == null)
        throw new CodingRuntimeException("Patient not provided");

    DomainFactory factory = getDomainFactory();
    List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()});

    if (careSpells != null && careSpells.size() > 0)
        return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public CareSpellVo getCareSpellById(CareSpellRefVo careSpellRef) 
{
    if(careSpellRef == null)
        return null;
    DomainFactory factory = getDomainFactory();
    return CareSpellVoAssembler.create((CareSpell)factory.getDomainObject(CareSpell.class, careSpellRef.getID_CareSpell()));
}