Java 类ims.nursing.vo.domain.NursingClinicalNotesVoAssembler 实例源码

项目:AvoinApotti    文件:CarePlanDetailsImpl.java   
public NursingClinicalNotesVoCollection listClinicalNotesForCarePlanAndDateRange(CarePlanRefVo carePlanRefVo, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if (carePlanRefVo != null && carePlanRefVo.getID_CarePlan() == null || dateFrom == null || dateTo == null || activeOnly == null)
        throw new CodingRuntimeException("Mandatory arguments not supplied to listClinicalNotesForCarePlanAndDateRange method");

    String hql = "from NursingClinicalNotes ncn join fetch ncn.carePlans as carePlan where carePlan.id = :idCarePlan and (ncn.recordingDateTime >= :startDate and ncn.recordingDateTime < :endDate ) ";
    if(activeOnly == true)
    {
        // WDEV-7771
        //hql += "and ncn.currentStatus.status.id = '" + ClinicalNotesStatus.ACTIVE.getID() + "'";
        //hql += "and ncn.currentStatus.correctionConfirmed != 1";
        hql += "and ncn.isCorrected <> 1"; //WDEV-15049
    }

    List notes = getDomainFactory().find(hql, new String[]{"idCarePlan", "startDate", "endDate"},new Object[]{carePlanRefVo.getID_CarePlan(), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()});
    return NursingClinicalNotesVoAssembler.createNursingClinicalNotesVoCollectionFromNursingClinicalNotes(notes);
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
public NursingClinicalNotesVoCollection listClinicalNotesForCarePlanAndDateRange(CarePlanRefVo carePlanRefVo, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if (carePlanRefVo != null && carePlanRefVo.getID_CarePlan() == null || dateFrom == null || dateTo == null || activeOnly == null)
        throw new CodingRuntimeException("Mandatory arguments not supplied to listClinicalNotesForCarePlanAndDateRange method");

    String hql = "from NursingClinicalNotes ncn join fetch ncn.carePlans as carePlan where carePlan.id = :idCarePlan and (ncn.recordingDateTime >= :startDate and ncn.recordingDateTime < :endDate ) ";
    if(activeOnly == true)
    {
        // WDEV-7771
        //hql += "and ncn.currentStatus.status.id = '" + ClinicalNotesStatus.ACTIVE.getID() + "'";
        //hql += "and ncn.currentStatus.correctionConfirmed != 1";
        hql += "and ncn.isCorrected <> 1"; //WDEV-15049
    }

    List notes = getDomainFactory().find(hql, new String[]{"idCarePlan", "startDate", "endDate"},new Object[]{carePlanRefVo.getID_CarePlan(), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()});
    return NursingClinicalNotesVoAssembler.createNursingClinicalNotesVoCollectionFromNursingClinicalNotes(notes);
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
public NursingClinicalNotesVoCollection listClinicalNotesForCarePlanAndDateRange(CarePlanRefVo carePlanRefVo, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if (carePlanRefVo != null && carePlanRefVo.getID_CarePlan() == null || dateFrom == null || dateTo == null || activeOnly == null)
        throw new CodingRuntimeException("Mandatory arguments not supplied to listClinicalNotesForCarePlanAndDateRange method");

    String hql = "from NursingClinicalNotes ncn join fetch ncn.carePlans as carePlan where carePlan.id = :idCarePlan and (ncn.recordingDateTime >= :startDate and ncn.recordingDateTime < :endDate ) ";
    if(activeOnly == true)
    {
        // WDEV-7771
        //hql += "and ncn.currentStatus.status.id = '" + ClinicalNotesStatus.ACTIVE.getID() + "'";
        //hql += "and ncn.currentStatus.correctionConfirmed != 1";
        hql += "and ncn.isCorrected <> 1"; //WDEV-15049
    }

    List notes = getDomainFactory().find(hql, new String[]{"idCarePlan", "startDate", "endDate"},new Object[]{carePlanRefVo.getID_CarePlan(), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()});
    return NursingClinicalNotesVoAssembler.createNursingClinicalNotesVoCollectionFromNursingClinicalNotes(notes);
}
项目:openmaxims-linux    文件:CarePlanDetailsImpl.java   
public NursingClinicalNotesVoCollection listClinicalNotesForCarePlanAndDateRange(CarePlanRefVo carePlanRefVo, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if (carePlanRefVo != null && carePlanRefVo.getID_CarePlan() == null || dateFrom == null || dateTo == null || activeOnly == null)
        throw new CodingRuntimeException("Mandatory arguments not supplied to listClinicalNotesForCarePlanAndDateRange method");

    String hql = "from NursingClinicalNotes ncn join fetch ncn.carePlans as carePlan where carePlan.id = :idCarePlan and (ncn.recordingDateTime >= :startDate and ncn.recordingDateTime < :endDate ) ";
    if(activeOnly == true)
    {
        // WDEV-7771
        //hql += "and ncn.currentStatus.status.id = '" + ClinicalNotesStatus.ACTIVE.getID() + "'";
        //hql += "and ncn.currentStatus.correctionConfirmed != 1";
        hql += "and ncn.isCorrected <> 1"; //WDEV-15049
    }

    List notes = getDomainFactory().find(hql, new String[]{"idCarePlan", "startDate", "endDate"},new Object[]{carePlanRefVo.getID_CarePlan(), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()});
    return NursingClinicalNotesVoAssembler.createNursingClinicalNotesVoCollectionFromNursingClinicalNotes(notes);
}
项目:AvoinApotti    文件:ClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNote)
{
    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNote.getID_ClinicalNotes());

    ims.nursing.vo.NursingClinicalNotesVo voNote = NursingClinicalNotesVoAssembler.create(notes);
    return voNote;
}
项目:AvoinApotti    文件:ClinicalNotesImpl.java   
public NursingClinicalNotesVo saveClinicalNotes(NursingClinicalNotesVo notesVo) throws StaleObjectException 
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:AvoinApotti    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNoteVo)
{
    //WDEV-14428
    if (clinicalNoteVo == null || clinicalNoteVo.getID_ClinicalNotes() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicalNotesVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNoteVo.getID_ClinicalNotes());

    return NursingClinicalNotesVoAssembler.create(notes);
}
项目:AvoinApotti    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Saves Clinical Note Details
*/
public ims.nursing.vo.NursingClinicalNotesVo saveClinicalNotes(ims.nursing.vo.NursingClinicalNotesVo notesVo) throws ims.domain.exceptions.StaleObjectException
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:openMAXIMS    文件:ClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNote)
{
    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNote.getID_ClinicalNotes());

    ims.nursing.vo.NursingClinicalNotesVo voNote = NursingClinicalNotesVoAssembler.create(notes);
    return voNote;
}
项目:openMAXIMS    文件:ClinicalNotesImpl.java   
public NursingClinicalNotesVo saveClinicalNotes(NursingClinicalNotesVo notesVo) throws StaleObjectException 
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:openMAXIMS    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNoteVo)
{
    //WDEV-14428
    if (clinicalNoteVo == null || clinicalNoteVo.getID_ClinicalNotes() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicalNotesVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNoteVo.getID_ClinicalNotes());

    return NursingClinicalNotesVoAssembler.create(notes);
}
项目:openMAXIMS    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Saves Clinical Note Details
*/
public ims.nursing.vo.NursingClinicalNotesVo saveClinicalNotes(ims.nursing.vo.NursingClinicalNotesVo notesVo) throws ims.domain.exceptions.StaleObjectException
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:openMAXIMS    文件:ClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNote)
{
    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNote.getID_ClinicalNotes());

    ims.nursing.vo.NursingClinicalNotesVo voNote = NursingClinicalNotesVoAssembler.create(notes);
    return voNote;
}
项目:openMAXIMS    文件:ClinicalNotesImpl.java   
public NursingClinicalNotesVo saveClinicalNotes(NursingClinicalNotesVo notesVo) throws StaleObjectException 
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:openMAXIMS    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNoteVo)
{
    //WDEV-14428
    if (clinicalNoteVo == null || clinicalNoteVo.getID_ClinicalNotes() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicalNotesVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNoteVo.getID_ClinicalNotes());

    return NursingClinicalNotesVoAssembler.create(notes);
}
项目:openMAXIMS    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Saves Clinical Note Details
*/
public ims.nursing.vo.NursingClinicalNotesVo saveClinicalNotes(ims.nursing.vo.NursingClinicalNotesVo notesVo) throws ims.domain.exceptions.StaleObjectException
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:openmaxims-linux    文件:ClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNote)
{
    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNote.getID_ClinicalNotes());

    ims.nursing.vo.NursingClinicalNotesVo voNote = NursingClinicalNotesVoAssembler.create(notes);
    return voNote;
}
项目:openmaxims-linux    文件:ClinicalNotesImpl.java   
public NursingClinicalNotesVo saveClinicalNotes(NursingClinicalNotesVo notesVo) throws StaleObjectException 
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}
项目:openmaxims-linux    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Gets the Clinical Notes Details for the given Clinical Note ID
*/
public ims.nursing.vo.NursingClinicalNotesVo getClinicalNotes(ims.core.vo.ClinicalNotesVo clinicalNoteVo)
{
    //WDEV-14428
    if (clinicalNoteVo == null || clinicalNoteVo.getID_ClinicalNotes() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicalNotesVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    NursingClinicalNotes notes = (NursingClinicalNotes)factory.getDomainObject(NursingClinicalNotes.class, clinicalNoteVo.getID_ClinicalNotes());

    return NursingClinicalNotesVoAssembler.create(notes);
}
项目:openmaxims-linux    文件:ExtendedCarePlanClinicalNotesImpl.java   
/**
* Saves Clinical Note Details
*/
public ims.nursing.vo.NursingClinicalNotesVo saveClinicalNotes(ims.nursing.vo.NursingClinicalNotesVo notesVo) throws ims.domain.exceptions.StaleObjectException
{
    if (!notesVo.isValidated())
        throw new DomainRuntimeException("This Clinical Note has not been validated");

    DomainFactory factory = getDomainFactory();

    NursingClinicalNotes domNotes = NursingClinicalNotesVoAssembler.extractNursingClinicalNotes(factory, notesVo);              

    // Save is needed as we then need to save this off with the careplans too being a bidirectional relationship
    factory.save(domNotes);

    return NursingClinicalNotesVoAssembler.create(domNotes);
}