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

项目:AvoinApotti    文件:PatientClericalTaskDialogImpl.java   
public ims.core.vo.PatientClericalTaskVo savePatientClericalTask(ims.core.vo.PatientClericalTaskVo patientClericalTask) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (patientClericalTask == null)

        throw new CodingRuntimeException("Cannot save patientClericalTask if null . ");

    if (!patientClericalTask.isValidated())
        throw new CodingRuntimeException("PatientClericalTaskVo not Validated");

    try
    {
        DomainFactory factory = getDomainFactory();
        PatientClericalTask clericalTask = PatientClericalTaskVoAssembler.extractPatientClericalTask(factory, patientClericalTask);

        factory.save(clericalTask);
        return PatientClericalTaskVoAssembler.create(clericalTask);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("A PatientClericalTask for this investigation already exist!", e);
    }
}
项目:AvoinApotti    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVoCollection getPatientClericalTasksByResultSelected(OrderInvestigationRefVo resultSelectedId) //WDEV-14080
{
    if(resultSelectedId == null || resultSelectedId.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelectedId.getID_OrderInvestigation()});

    return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list); //WDEV-14080

}
项目:AvoinApotti    文件:PathologyDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(OrderInvestigationRefVo resultSelected) 
{
    if(resultSelected == null || resultSelected.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelected.getID_OrderInvestigation()});

    if (list!=null && list.size()>0)
    {
        return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list).get(0);
    }
    return null;

}
项目:openMAXIMS    文件:PatientClericalTaskDialogImpl.java   
public ims.core.vo.PatientClericalTaskVo savePatientClericalTask(ims.core.vo.PatientClericalTaskVo patientClericalTask) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (patientClericalTask == null)

        throw new CodingRuntimeException("Cannot save patientClericalTask if null . ");

    if (!patientClericalTask.isValidated())
        throw new CodingRuntimeException("PatientClericalTaskVo not Validated");

    try
    {
        DomainFactory factory = getDomainFactory();
        PatientClericalTask clericalTask = PatientClericalTaskVoAssembler.extractPatientClericalTask(factory, patientClericalTask);

        factory.save(clericalTask);
        return PatientClericalTaskVoAssembler.create(clericalTask);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("A PatientClericalTask for this investigation already exist!", e);
    }
}
项目:openMAXIMS    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVoCollection getPatientClericalTasksByResultSelected(OrderInvestigationRefVo resultSelectedId) //WDEV-14080
{
    if(resultSelectedId == null || resultSelectedId.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelectedId.getID_OrderInvestigation()});

    return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list); //WDEV-14080

}
项目:openMAXIMS    文件:PathologyDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(OrderInvestigationRefVo resultSelected) 
{
    if(resultSelected == null || resultSelected.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelected.getID_OrderInvestigation()});

    if (list!=null && list.size()>0)
    {
        return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list).get(0);
    }
    return null;

}
项目:openMAXIMS    文件:PatientClericalTaskDialogImpl.java   
public ims.core.vo.PatientClericalTaskVo savePatientClericalTask(ims.core.vo.PatientClericalTaskVo patientClericalTask) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (patientClericalTask == null)

        throw new CodingRuntimeException("Cannot save patientClericalTask if null . ");

    if (!patientClericalTask.isValidated())
        throw new CodingRuntimeException("PatientClericalTaskVo not Validated");

    try
    {
        DomainFactory factory = getDomainFactory();
        PatientClericalTask clericalTask = PatientClericalTaskVoAssembler.extractPatientClericalTask(factory, patientClericalTask);

        factory.save(clericalTask);
        return PatientClericalTaskVoAssembler.create(clericalTask);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("A PatientClericalTask for this investigation already exist!", e);
    }
}
项目:openMAXIMS    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVoCollection getPatientClericalTasksByResultSelected(OrderInvestigationRefVo resultSelectedId) //WDEV-14080
{
    if(resultSelectedId == null || resultSelectedId.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelectedId.getID_OrderInvestigation()});

    return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list); //WDEV-14080

}
项目:openMAXIMS    文件:PathologyDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(OrderInvestigationRefVo resultSelected) 
{
    if(resultSelected == null || resultSelected.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelected.getID_OrderInvestigation()});

    if (list!=null && list.size()>0)
    {
        return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list).get(0);
    }
    return null;

}
项目:openmaxims-linux    文件:PatientClericalTaskDialogImpl.java   
public ims.core.vo.PatientClericalTaskVo savePatientClericalTask(ims.core.vo.PatientClericalTaskVo patientClericalTask) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (patientClericalTask == null)

        throw new CodingRuntimeException("Cannot save patientClericalTask if null . ");

    if (!patientClericalTask.isValidated())
        throw new CodingRuntimeException("PatientClericalTaskVo not Validated");

    try
    {
        DomainFactory factory = getDomainFactory();
        PatientClericalTask clericalTask = PatientClericalTaskVoAssembler.extractPatientClericalTask(factory, patientClericalTask);

        factory.save(clericalTask);
        return PatientClericalTaskVoAssembler.create(clericalTask);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("A PatientClericalTask for this investigation already exist!", e);
    }
}
项目:openmaxims-linux    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVoCollection getPatientClericalTasksByResultSelected(OrderInvestigationRefVo resultSelectedId) //WDEV-14080
{
    if(resultSelectedId == null || resultSelectedId.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelectedId.getID_OrderInvestigation()});

    return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list); //WDEV-14080

}
项目:openmaxims-linux    文件:PathologyDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(OrderInvestigationRefVo resultSelected) 
{
    if(resultSelected == null || resultSelected.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("Can not get ResultSelected value on null Id.");

    StringBuffer hql = new StringBuffer();
    hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation ");
    hql.append("where orderInvestigation.id = :orderId ");
    hql.append("order by patClericalTask.requestedDateTime desc");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelected.getID_OrderInvestigation()});

    if (list!=null && list.size()>0)
    {
        return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list).get(0);
    }
    return null;

}
项目:AvoinApotti    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(PatientClericalTaskRefVo patientClericalTaskId) 
{
    if (patientClericalTaskId == null || patientClericalTaskId.getID_PatientClericalTask() == null)
    {
        throw new CodingRuntimeException("Cannot get PatientClericalTaskRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    PatientClericalTask domainPatientClericalTask = (PatientClericalTask) factory.getDomainObject(PatientClericalTask.class, patientClericalTaskId.getID_PatientClericalTask());

    return PatientClericalTaskVoAssembler.create(domainPatientClericalTask);

}
项目:openMAXIMS    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(PatientClericalTaskRefVo patientClericalTaskId) 
{
    if (patientClericalTaskId == null || patientClericalTaskId.getID_PatientClericalTask() == null)
    {
        throw new CodingRuntimeException("Cannot get PatientClericalTaskRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    PatientClericalTask domainPatientClericalTask = (PatientClericalTask) factory.getDomainObject(PatientClericalTask.class, patientClericalTaskId.getID_PatientClericalTask());

    return PatientClericalTaskVoAssembler.create(domainPatientClericalTask);

}
项目:openMAXIMS    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(PatientClericalTaskRefVo patientClericalTaskId) 
{
    if (patientClericalTaskId == null || patientClericalTaskId.getID_PatientClericalTask() == null)
    {
        throw new CodingRuntimeException("Cannot get PatientClericalTaskRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    PatientClericalTask domainPatientClericalTask = (PatientClericalTask) factory.getDomainObject(PatientClericalTask.class, patientClericalTaskId.getID_PatientClericalTask());

    return PatientClericalTaskVoAssembler.create(domainPatientClericalTask);

}
项目:openmaxims-linux    文件:PatientClericalTaskDialogImpl.java   
public PatientClericalTaskVo getPatientClericalTask(PatientClericalTaskRefVo patientClericalTaskId) 
{
    if (patientClericalTaskId == null || patientClericalTaskId.getID_PatientClericalTask() == null)
    {
        throw new CodingRuntimeException("Cannot get PatientClericalTaskRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    PatientClericalTask domainPatientClericalTask = (PatientClericalTask) factory.getDomainObject(PatientClericalTask.class, patientClericalTaskId.getID_PatientClericalTask());

    return PatientClericalTaskVoAssembler.create(domainPatientClericalTask);

}