Java 类ims.clinical.vo.domain.IntraOperativeCareRecordVoAssembler 实例源码

项目:AvoinApotti    文件:DischargeSummaryWardPacuImpl.java   
public PatientProcedureRefVo getPerformedProcedureFromLastIntraOperativeRecordForCareContext(CareContextRefVo careContextRef) 
{
    if (careContextRef == null || !careContextRef.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("A care context must be selected");

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, getDomainFactory()); 
    criteria.equal("this.careContext.id", careContextRef.getID_CareContext());
    criteria.addOrder("this.systemInformation.creationDateTime", ORDERMODE.DESC);

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    IntraOperativeCareRecordVo voIntra = listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
    return voIntra != null ? voIntra.getActualProcedure() : null;
}
项目:AvoinApotti    文件:PlannedProcedureImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo refVo) {
    if (refVo == null || !refVo.getID_IntraOperativeCareRecordIsNotNull()){
        throw new CodingRuntimeException("IntraOperativeCareRecord ref is null or ref.id is null");
    }

    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)getDomainFactory().getDomainObject(IntraOperativeCareRecord.class,refVo.getID_IntraOperativeCareRecord()));
}
项目:AvoinApotti    文件:IntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) listIntraOperativeCareRecord.get(0)) : null;
}
项目:AvoinApotti    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(IntraOperativeCareRecordRefVo intraOperativeRecord)
{
    if (intraOperativeRecord == null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) factory.getDomainObject(IntraOperativeCareRecord.class, intraOperativeRecord.getID_IntraOperativeCareRecord()));
    /*
     * IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory); criteria.equal("this.id", intraOperativeRecord.getID_IntraOperativeCareRecord()); //IntraOperativeCareRecord.FieldNames.ID List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find(); return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
     */
}
项目:AvoinApotti    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);    
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;

}
项目:AvoinApotti    文件:CataractIntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo intraOperativeRecord) {
    if (intraOperativeRecord==null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull() )
        throw new CodingRuntimeException("intraOperativeRecord is null or id is null");
    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)factory.getDomainObject(IntraOperativeCareRecord.class,intraOperativeRecord.getID_IntraOperativeCareRecord()));
}
项目:openMAXIMS    文件:DischargeSummaryWardPacuImpl.java   
public PatientProcedureRefVo getPerformedProcedureFromLastIntraOperativeRecordForCareContext(CareContextRefVo careContextRef) 
{
    if (careContextRef == null || !careContextRef.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("A care context must be selected");

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, getDomainFactory()); 
    criteria.equal("this.careContext.id", careContextRef.getID_CareContext());
    criteria.addOrder("this.systemInformation.creationDateTime", ORDERMODE.DESC);

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    IntraOperativeCareRecordVo voIntra = listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
    return voIntra != null ? voIntra.getActualProcedure() : null;
}
项目:openMAXIMS    文件:PlannedProcedureImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo refVo) {
    if (refVo == null || !refVo.getID_IntraOperativeCareRecordIsNotNull()){
        throw new CodingRuntimeException("IntraOperativeCareRecord ref is null or ref.id is null");
    }

    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)getDomainFactory().getDomainObject(IntraOperativeCareRecord.class,refVo.getID_IntraOperativeCareRecord()));
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) listIntraOperativeCareRecord.get(0)) : null;
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(IntraOperativeCareRecordRefVo intraOperativeRecord)
{
    if (intraOperativeRecord == null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) factory.getDomainObject(IntraOperativeCareRecord.class, intraOperativeRecord.getID_IntraOperativeCareRecord()));
    /*
     * IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory); criteria.equal("this.id", intraOperativeRecord.getID_IntraOperativeCareRecord()); //IntraOperativeCareRecord.FieldNames.ID List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find(); return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
     */
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);    
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;

}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo intraOperativeRecord) {
    if (intraOperativeRecord==null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull() )
        throw new CodingRuntimeException("intraOperativeRecord is null or id is null");
    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)factory.getDomainObject(IntraOperativeCareRecord.class,intraOperativeRecord.getID_IntraOperativeCareRecord()));
}
项目:openMAXIMS    文件:DischargeSummaryWardPacuImpl.java   
public PatientProcedureRefVo getPerformedProcedureFromLastIntraOperativeRecordForCareContext(CareContextRefVo careContextRef) 
{
    if (careContextRef == null || !careContextRef.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("A care context must be selected");

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, getDomainFactory()); 
    criteria.equal("this.careContext.id", careContextRef.getID_CareContext());
    criteria.addOrder("this.systemInformation.creationDateTime", ORDERMODE.DESC);

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    IntraOperativeCareRecordVo voIntra = listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
    return voIntra != null ? voIntra.getActualProcedure() : null;
}
项目:openMAXIMS    文件:PlannedProcedureImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo refVo) {
    if (refVo == null || !refVo.getID_IntraOperativeCareRecordIsNotNull()){
        throw new CodingRuntimeException("IntraOperativeCareRecord ref is null or ref.id is null");
    }

    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)getDomainFactory().getDomainObject(IntraOperativeCareRecord.class,refVo.getID_IntraOperativeCareRecord()));
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) listIntraOperativeCareRecord.get(0)) : null;
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(IntraOperativeCareRecordRefVo intraOperativeRecord)
{
    if (intraOperativeRecord == null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) factory.getDomainObject(IntraOperativeCareRecord.class, intraOperativeRecord.getID_IntraOperativeCareRecord()));
    /*
     * IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory); criteria.equal("this.id", intraOperativeRecord.getID_IntraOperativeCareRecord()); //IntraOperativeCareRecord.FieldNames.ID List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find(); return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
     */
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);    
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;

}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo intraOperativeRecord) {
    if (intraOperativeRecord==null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull() )
        throw new CodingRuntimeException("intraOperativeRecord is null or id is null");
    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)factory.getDomainObject(IntraOperativeCareRecord.class,intraOperativeRecord.getID_IntraOperativeCareRecord()));
}
项目:openmaxims-linux    文件:PlannedProcedureImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo refVo) {
    if (refVo == null || !refVo.getID_IntraOperativeCareRecordIsNotNull()){
        throw new CodingRuntimeException("IntraOperativeCareRecord ref is null or ref.id is null");
    }

    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)getDomainFactory().getDomainObject(IntraOperativeCareRecord.class,refVo.getID_IntraOperativeCareRecord()));
}
项目:openmaxims-linux    文件:IntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) listIntraOperativeCareRecord.get(0)) : null;
}
项目:openmaxims-linux    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(IntraOperativeCareRecordRefVo intraOperativeRecord)
{
    if (intraOperativeRecord == null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord) factory.getDomainObject(IntraOperativeCareRecord.class, intraOperativeRecord.getID_IntraOperativeCareRecord()));
    /*
     * IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory); criteria.equal("this.id", intraOperativeRecord.getID_IntraOperativeCareRecord()); //IntraOperativeCareRecord.FieldNames.ID List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find(); return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;
     */
}
项目:openmaxims-linux    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo getIntraOperativeCareRecord(ims.core.clinical.vo.IntraOperativeDetailsRefVo intraOperativeDetails)
{
    if (intraOperativeDetails == null || !intraOperativeDetails.getID_IntraOperativeDetailsIsNotNull())
        throw new CodingRuntimeException("intraOperativeDetails is null or id not provided in method getIntraOperativeCareRecord");

    DomainFactory factory = getDomainFactory();

    IMSCriteria criteria = new IMSCriteria(IntraOperativeCareRecord.class, factory);    
    criteria.equal("this.intraOperativeDetails.id", intraOperativeDetails.getID_IntraOperativeDetails());

    List<IntraOperativeCareRecord> listIntraOperativeCareRecord = criteria.find();
    return listIntraOperativeCareRecord.size() > 0 ? IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)listIntraOperativeCareRecord.get(0)) : null;

}
项目:openmaxims-linux    文件:CataractIntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo getIntraOperativeCareRecord(
        IntraOperativeCareRecordRefVo intraOperativeRecord) {
    if (intraOperativeRecord==null || !intraOperativeRecord.getID_IntraOperativeCareRecordIsNotNull() )
        throw new CodingRuntimeException("intraOperativeRecord is null or id is null");
    DomainFactory factory = getDomainFactory();
    return IntraOperativeCareRecordVoAssembler.create((IntraOperativeCareRecord)factory.getDomainObject(IntraOperativeCareRecord.class,intraOperativeRecord.getID_IntraOperativeCareRecord()));
}
项目:AvoinApotti    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo save(IntraOperativeCareRecordVo record, Booking_AppointmentShortVo voAppt) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");

    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);
    factory.save(domIntraOperativeCareRecord);

    // WDEV-12173
    if (voAppt != null)
    {
        Booking_Appointment doAppt = Booking_AppointmentShortVoAssembler.extractBooking_Appointment(factory, voAppt);
        List intraOPs = new ArrayList();
        Iterator it = doAppt.getIntraOperativeCareRecord().iterator();
        while (it.hasNext())
        {
            IntraOperativeCareRecord doIntra = (IntraOperativeCareRecord) it.next();
            intraOPs.add(doIntra);
        }

        intraOPs.add(domIntraOperativeCareRecord);

        if (intraOPs.size() > 0)
        {
            doAppt.getIntraOperativeCareRecord().clear();
            doAppt.setIntraOperativeCareRecord(intraOPs);

            factory.save(doAppt);
        }
    }

    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);


    // WDEV-13471
    // If the performed procedure hasn't the IntraOperative Care record associated, associate it now
    PatientProcedureVo patientProcedurePerformed = getProcedure(intraOperativeCareRecord.getActualProcedure());

    if (patientProcedurePerformed != null && !patientProcedurePerformed.getIntraOperativeRecordIsNotNull())
    {
        patientProcedurePerformed.setIntraOperativeRecord(intraOperativeCareRecord);

        PatientProcedure domPatientProcedurePerformed = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedurePerformed);
        factory.save(domPatientProcedurePerformed);
    }

    return intraOperativeCareRecord;
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo save(IntraOperativeCareRecordVo record, Booking_AppointmentShortVo voAppt) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");

    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);
    factory.save(domIntraOperativeCareRecord);

    // WDEV-12173
    if (voAppt != null)
    {
        Booking_Appointment doAppt = Booking_AppointmentShortVoAssembler.extractBooking_Appointment(factory, voAppt);
        List intraOPs = new ArrayList();
        Iterator it = doAppt.getIntraOperativeCareRecord().iterator();
        while (it.hasNext())
        {
            IntraOperativeCareRecord doIntra = (IntraOperativeCareRecord) it.next();
            intraOPs.add(doIntra);
        }

        intraOPs.add(domIntraOperativeCareRecord);

        if (intraOPs.size() > 0)
        {
            doAppt.getIntraOperativeCareRecord().clear();
            doAppt.setIntraOperativeCareRecord(intraOPs);

            factory.save(doAppt);
        }
    }

    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);


    // WDEV-13471
    // If the performed procedure hasn't the IntraOperative Care record associated, associate it now
    PatientProcedureVo patientProcedurePerformed = getProcedure(intraOperativeCareRecord.getActualProcedure());

    if (patientProcedurePerformed != null && !patientProcedurePerformed.getIntraOperativeRecordIsNotNull())
    {
        patientProcedurePerformed.setIntraOperativeRecord(intraOperativeCareRecord);

        PatientProcedure domPatientProcedurePerformed = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedurePerformed);
        factory.save(domPatientProcedurePerformed);
    }

    return intraOperativeCareRecord;
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo save(IntraOperativeCareRecordVo record, Booking_AppointmentShortVo voAppt) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");

    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);
    factory.save(domIntraOperativeCareRecord);

    // WDEV-12173
    if (voAppt != null)
    {
        Booking_Appointment doAppt = Booking_AppointmentShortVoAssembler.extractBooking_Appointment(factory, voAppt);
        List intraOPs = new ArrayList();
        Iterator it = doAppt.getIntraOperativeCareRecord().iterator();
        while (it.hasNext())
        {
            IntraOperativeCareRecord doIntra = (IntraOperativeCareRecord) it.next();
            intraOPs.add(doIntra);
        }

        intraOPs.add(domIntraOperativeCareRecord);

        if (intraOPs.size() > 0)
        {
            doAppt.getIntraOperativeCareRecord().clear();
            doAppt.setIntraOperativeCareRecord(intraOPs);

            factory.save(doAppt);
        }
    }

    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);


    // WDEV-13471
    // If the performed procedure hasn't the IntraOperative Care record associated, associate it now
    PatientProcedureVo patientProcedurePerformed = getProcedure(intraOperativeCareRecord.getActualProcedure());

    if (patientProcedurePerformed != null && !patientProcedurePerformed.getIntraOperativeRecordIsNotNull())
    {
        patientProcedurePerformed.setIntraOperativeRecord(intraOperativeCareRecord);

        PatientProcedure domPatientProcedurePerformed = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedurePerformed);
        factory.save(domPatientProcedurePerformed);
    }

    return intraOperativeCareRecord;
}
项目:openmaxims-linux    文件:IntraOperativeCareRecordImpl.java   
public IntraOperativeCareRecordVo save(IntraOperativeCareRecordVo record, Booking_AppointmentShortVo voAppt) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");

    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);
    factory.save(domIntraOperativeCareRecord);

    // WDEV-12173
    if (voAppt != null)
    {
        Booking_Appointment doAppt = Booking_AppointmentShortVoAssembler.extractBooking_Appointment(factory, voAppt);
        List intraOPs = new ArrayList();
        Iterator it = doAppt.getIntraOperativeCareRecord().iterator();
        while (it.hasNext())
        {
            IntraOperativeCareRecord doIntra = (IntraOperativeCareRecord) it.next();
            intraOPs.add(doIntra);
        }

        intraOPs.add(domIntraOperativeCareRecord);

        if (intraOPs.size() > 0)
        {
            doAppt.getIntraOperativeCareRecord().clear();
            doAppt.setIntraOperativeCareRecord(intraOPs);

            factory.save(doAppt);
        }
    }

    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);


    // WDEV-13471
    // If the performed procedure hasn't the IntraOperative Care record associated, associate it now
    PatientProcedureVo patientProcedurePerformed = getProcedure(intraOperativeCareRecord.getActualProcedure());

    if (patientProcedurePerformed != null && !patientProcedurePerformed.getIntraOperativeRecordIsNotNull())
    {
        patientProcedurePerformed.setIntraOperativeRecord(intraOperativeCareRecord);

        PatientProcedure domPatientProcedurePerformed = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedurePerformed);
        factory.save(domPatientProcedurePerformed);
    }

    return intraOperativeCareRecord;
}
项目:AvoinApotti    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo save(ims.clinical.vo.IntraOperativeCareRecordVo record) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");


    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);

    factory.save(domIntraOperativeCareRecord);


    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);

    return intraOperativeCareRecord;
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo save(ims.clinical.vo.IntraOperativeCareRecordVo record) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");


    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);

    factory.save(domIntraOperativeCareRecord);


    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);

    return intraOperativeCareRecord;
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo save(ims.clinical.vo.IntraOperativeCareRecordVo record) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");


    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);

    factory.save(domIntraOperativeCareRecord);


    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);

    return intraOperativeCareRecord;
}
项目:openmaxims-linux    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.clinical.vo.IntraOperativeCareRecordVo save(ims.clinical.vo.IntraOperativeCareRecordVo record) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (record == null)
        throw new CodingRuntimeException("record is null in method save");

    if (!record.isValidated())
        throw new CodingRuntimeException("record has not been validated in method save");


    DomainFactory factory = getDomainFactory();

    IntraOperativeCareRecord domIntraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.extractIntraOperativeCareRecord(factory, record);

    factory.save(domIntraOperativeCareRecord);


    IntraOperativeCareRecordVo intraOperativeCareRecord = IntraOperativeCareRecordVoAssembler.create(domIntraOperativeCareRecord);

    PatientProcedureVo patientProcedure = getProcedure(intraOperativeCareRecord.getPlannedProcedure());
    patientProcedure.setIntraOperativeRecord(intraOperativeCareRecord);

    PatientProcedure domPatientProcedure = PatientProcedureVoAssembler.extractPatientProcedure(factory, patientProcedure);

    factory.save(domPatientProcedure);

    return intraOperativeCareRecord;
}