Java 类ims.emergency.vo.domain.InvestigationAttendenceDetailVoAssembler 实例源码

项目:openMAXIMS    文件:InterventionsDiagnosisInvestigationsCcImpl.java   
public InvestigationAttendenceDetailVo inactivateInvestigationAttendenceDetail(InvestigationAttendenceDetailVo record, AttendDiagInvTreatStatusVo attendDiagInvTreatStatus) throws StaleObjectException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null InvestigationAttendenceDetailVo.");

    if(!record.isValidated())
        throw new CodingRuntimeException("InvestigationAttendenceDetailVo is not validated.");

    DomainFactory factory = getDomainFactory();

    InvestigationAttendenceDetail doRecord = InvestigationAttendenceDetailVoAssembler.extractInvestigationAttendenceDetail(factory, record);
    factory.save(doRecord);

    if(attendDiagInvTreatStatus != null)
    {
        AttendDiagInvTreatStatus doAttendDiagInvTreat = AttendDiagInvTreatStatusVoAssembler.extractAttendDiagInvTreatStatus(factory, attendDiagInvTreatStatus);
        factory.save(doAttendDiagInvTreat);
    }

    return record;
}
项目:AvoinApotti    文件:InterventionsDiagnosisInvestigationsCcImpl.java   
public InvestigationAttendenceDetailVoCollection listInvestigationAttendence(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select ia from InvestigationAttendenceDetail as ia left join ia.attendance as at left join ia.attendenceInvestigation as ai where at.id = :AttendenceId and ia.active = 1 order by UPPER(ai.text) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {careContext.getID_CareContext()});

    return InvestigationAttendenceDetailVoAssembler.createInvestigationAttendenceDetailVoCollectionFromInvestigationAttendenceDetail(list);
}
项目:AvoinApotti    文件:InvestigationAttendenceDetailDialogImpl.java   
public ims.emergency.vo.InvestigationAttendenceDetailVo save(ims.emergency.vo.InvestigationAttendenceDetailVo record) throws ims.domain.exceptions.StaleObjectException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null InvestigationAttendenceDetailVo.");

    if(!record.isValidated())
        throw new CodingRuntimeException("InvestigationAttendenceDetailVo is not validated.");

    DomainFactory factory = getDomainFactory();

    InvestigationAttendenceDetail doRecord = InvestigationAttendenceDetailVoAssembler.extractInvestigationAttendenceDetail(factory, record);

    factory.save(doRecord);
    return InvestigationAttendenceDetailVoAssembler.create(doRecord);
}
项目:openMAXIMS    文件:InterventionsDiagnosisInvestigationsCcImpl.java   
public InvestigationAttendenceDetailVoCollection listInvestigationAttendence(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select ia from InvestigationAttendenceDetail as ia left join ia.attendance as at left join ia.attendenceInvestigation as ai where at.id = :AttendenceId and ia.active = 1 order by UPPER(ai.text) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {careContext.getID_CareContext()});

    return InvestigationAttendenceDetailVoAssembler.createInvestigationAttendenceDetailVoCollectionFromInvestigationAttendenceDetail(list);
}
项目:openMAXIMS    文件:InterventionsDiagnosisInvestigationsCcImpl.java   
public InvestigationAttendenceDetailVoCollection listInvestigationAttendence(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select ia from InvestigationAttendenceDetail as ia left join ia.attendance as at left join ia.attendenceInvestigation as ai where at.id = :AttendenceId and ia.active = 1 order by UPPER(ai.text) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {careContext.getID_CareContext()});

    return InvestigationAttendenceDetailVoAssembler.createInvestigationAttendenceDetailVoCollectionFromInvestigationAttendenceDetail(list);
}
项目:openMAXIMS    文件:InvestigationAttendenceDetailDialogImpl.java   
public ims.emergency.vo.InvestigationAttendenceDetailVo save(ims.emergency.vo.InvestigationAttendenceDetailVo record) throws ims.domain.exceptions.StaleObjectException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null InvestigationAttendenceDetailVo.");

    if(!record.isValidated())
        throw new CodingRuntimeException("InvestigationAttendenceDetailVo is not validated.");

    DomainFactory factory = getDomainFactory();

    InvestigationAttendenceDetail doRecord = InvestigationAttendenceDetailVoAssembler.extractInvestigationAttendenceDetail(factory, record);

    factory.save(doRecord);
    return InvestigationAttendenceDetailVoAssembler.create(doRecord);
}
项目:openmaxims-linux    文件:InterventionsDiagnosisInvestigationsCcImpl.java   
public InvestigationAttendenceDetailVoCollection listInvestigationAttendence(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "select ia from InvestigationAttendenceDetail as ia left join ia.attendance as at left join ia.attendenceInvestigation as ai where at.id = :AttendenceId and ia.active = 1 order by UPPER(ai.text) asc";

    List<?> list = factory.find(query, new String[] {"AttendenceId"}, new Object[] {careContext.getID_CareContext()});

    return InvestigationAttendenceDetailVoAssembler.createInvestigationAttendenceDetailVoCollectionFromInvestigationAttendenceDetail(list);
}
项目:openmaxims-linux    文件:InvestigationAttendenceDetailDialogImpl.java   
public ims.emergency.vo.InvestigationAttendenceDetailVo save(ims.emergency.vo.InvestigationAttendenceDetailVo record) throws ims.domain.exceptions.StaleObjectException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null InvestigationAttendenceDetailVo.");

    if(!record.isValidated())
        throw new CodingRuntimeException("InvestigationAttendenceDetailVo is not validated.");

    DomainFactory factory = getDomainFactory();

    InvestigationAttendenceDetail doRecord = InvestigationAttendenceDetailVoAssembler.extractInvestigationAttendenceDetail(factory, record);

    factory.save(doRecord);
    return InvestigationAttendenceDetailVoAssembler.create(doRecord);
}
项目:openMAXIMS    文件:InvestigationAttendenceDetailDialogImpl.java   
public ims.emergency.vo.InvestigationAttendenceDetailVo save(ims.emergency.vo.InvestigationAttendenceDetailVo record, InvestigationsForAttendVo investigationsForAttend) throws ims.domain.exceptions.StaleObjectException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null InvestigationAttendenceDetailVo.");

    if(!record.isValidated())
        throw new CodingRuntimeException("InvestigationAttendenceDetailVo is not validated.");

    DomainFactory factory = getDomainFactory();

    InvestigationAttendenceDetail doRecord = InvestigationAttendenceDetailVoAssembler.extractInvestigationAttendenceDetail(factory, record);
    factory.save(doRecord);

    InvestigationAttendenceDetailVo newRecord = InvestigationAttendenceDetailVoAssembler.create(doRecord);

    if(investigationsForAttend != null)
    {
        if(record.getID_InvestigationAttendenceDetail() == null)
        {
            if(investigationsForAttend.getInvestigations() == null)
            {
                investigationsForAttend.setInvestigations(new InvestigationAttendenceDetailVoCollection());
            }

            investigationsForAttend.getInvestigations().add(newRecord);

            InvestigationsForAttend doInvestigationsForAttend = InvestigationsForAttendVoAssembler.extractInvestigationsForAttend(factory, investigationsForAttend);
            factory.save(doInvestigationsForAttend);
        }

        //WDEV-19057
        if(!Boolean.TRUE.equals(record.getAddedDuringCoding()))
        {
            AttendDiagInvTreatStatusVo attendDiagInvTreatStatus = getAttendDiagInvTreatStatus(investigationsForAttend.getAttendance());
            if (attendDiagInvTreatStatus != null && (Boolean.TRUE.equals(attendDiagInvTreatStatus.getNoInvestigations()) || Boolean.TRUE.equals(attendDiagInvTreatStatus.getInvestigationNotRecorded())))
            {
                attendDiagInvTreatStatus.setNoInvestigations(null);
                attendDiagInvTreatStatus.setInvestigationNotRecorded(null);

                AttendDiagInvTreatStatus doAttendDiagInvTreatStatus = AttendDiagInvTreatStatusVoAssembler.extractAttendDiagInvTreatStatus(factory, attendDiagInvTreatStatus);
                factory.save(doAttendDiagInvTreatStatus);
            }
        }
    }

    return newRecord;
}