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

项目:AvoinApotti    文件:SurgicalOperationsImpl.java   
public PatientProcedureVoCollection listCareContextPatientProcedures(CareContextRefVo refVoCareContext) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure pp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (refVoCareContext != null)
    {
        hql.append(andStr + " pp.careContext.id =:cc");
        markers.add("cc");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List patientSurOp = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientSurOp);
}
项目:openMAXIMS    文件:SurgicalOperationsImpl.java   
public PatientProcedureVoCollection listCareContextPatientProcedures(CareContextRefVo refVoCareContext) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure pp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (refVoCareContext != null)
    {
        hql.append(andStr + " pp.careContext.id =:cc");
        markers.add("cc");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List patientSurOp = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientSurOp);
}
项目:openMAXIMS    文件:SurgicalOperationsImpl.java   
public PatientProcedureVoCollection listCareContextPatientProcedures(CareContextRefVo refVoCareContext) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure pp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (refVoCareContext != null)
    {
        hql.append(andStr + " pp.careContext.id =:cc");
        markers.add("cc");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List patientSurOp = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientSurOp);
}
项目:openmaxims-linux    文件:SurgicalOperationsImpl.java   
public PatientProcedureVoCollection listCareContextPatientProcedures(CareContextRefVo refVoCareContext) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure pp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (refVoCareContext != null)
    {
        hql.append(andStr + " pp.careContext.id =:cc");
        markers.add("cc");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List patientSurOp = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientSurOp);
}
项目:AvoinApotti    文件:PlannedProcedureImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedureRefVo)
{
    if( patientProcedureRefVo == null)
        throw new DomainRuntimeException("PatientProcedure cannot be null.");

    if( patientProcedureRefVo.getID_PatientProcedure() == null)
        throw new DomainRuntimeException("PatientProcedure ID cannot be null.");

    DomainFactory factory = getDomainFactory();
    PatientProcedure doPatProcedure = (PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedureRefVo.getID_PatientProcedure());
    return PatientProcedureVoAssembler.create(doPatProcedure);
}
项目:AvoinApotti    文件:PatientProceduresImpl.java   
public PatientProcedureVoCollection listClinicalContactProcedures(ClinicalContactShortVo voClinicalContactShort, CareContextShortVo careContext)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (careContext != null)
    {
        hql.append(andStr + " t.careContext.id = :ccid");
        markers.add("ccid");
        values.add(careContext.getID_CareContext());
        andStr = " and ";
    }
    else if (voClinicalContactShort != null)
    {
        hql.append(andStr + " t.clinicalContact.id = :rcc");
        markers.add("rcc");
        values.add(new Boolean(true));
        andStr = " and ";

    }

    hql.append(andStr + " t.procedureStatus = :perf");
    markers.add("perf");
    values.add(getDomLookup(PatientProcedureStatus.PERFORMED));
    andStr = " and ";

    if (markers.size() > 0)
        query += " where t.class is null  and";
    query += hql.toString();

    List patientProcedureList = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientProcedureList).sort();

}
项目:AvoinApotti    文件:PatientProceduresImpl.java   
public PatientProcedureVo getPatientProcedure(PatientProcedureRefVo procedureRef)
{
    if (procedureRef == null || !procedureRef.getID_PatientProcedureIsNotNull())
        return null;

    return PatientProcedureVoAssembler.create((PatientProcedure) getDomainFactory().getDomainObject(PatientProcedure.class, procedureRef.getID_PatientProcedure()));
}
项目:AvoinApotti    文件:IntraOperativeCareRecordImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:AvoinApotti    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.core.vo.PatientProcedureVo getProcedure(ims.core.clinical.vo.PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:openMAXIMS    文件:PlannedProcedureImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedureRefVo)
{
    if( patientProcedureRefVo == null)
        throw new DomainRuntimeException("PatientProcedure cannot be null.");

    if( patientProcedureRefVo.getID_PatientProcedure() == null)
        throw new DomainRuntimeException("PatientProcedure ID cannot be null.");

    DomainFactory factory = getDomainFactory();
    PatientProcedure doPatProcedure = (PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedureRefVo.getID_PatientProcedure());
    return PatientProcedureVoAssembler.create(doPatProcedure);
}
项目:openMAXIMS    文件:PatientProceduresImpl.java   
public PatientProcedureVoCollection listClinicalContactProcedures(ClinicalContactShortVo voClinicalContactShort, CareContextShortVo careContext)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (careContext != null)
    {
        hql.append(andStr + " t.careContext.id = :ccid");
        markers.add("ccid");
        values.add(careContext.getID_CareContext());
        andStr = " and ";
    }
    else if (voClinicalContactShort != null)
    {
        hql.append(andStr + " t.clinicalContact.id = :rcc");
        markers.add("rcc");
        values.add(new Boolean(true));
        andStr = " and ";

    }

    hql.append(andStr + " t.procedureStatus = :perf");
    markers.add("perf");
    values.add(getDomLookup(PatientProcedureStatus.PERFORMED));
    andStr = " and ";

    if (markers.size() > 0)
        query += " where t.class is null  and";
    query += hql.toString();

    List patientProcedureList = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientProcedureList).sort();

}
项目:openMAXIMS    文件:PatientProceduresImpl.java   
public PatientProcedureVo getPatientProcedure(PatientProcedureRefVo procedureRef)
{
    if (procedureRef == null || !procedureRef.getID_PatientProcedureIsNotNull())
        return null;

    return PatientProcedureVoAssembler.create((PatientProcedure) getDomainFactory().getDomainObject(PatientProcedure.class, procedureRef.getID_PatientProcedure()));
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.core.vo.PatientProcedureVo getProcedure(ims.core.clinical.vo.PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:openMAXIMS    文件:PlannedProcedureImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedureRefVo)
{
    if( patientProcedureRefVo == null)
        throw new DomainRuntimeException("PatientProcedure cannot be null.");

    if( patientProcedureRefVo.getID_PatientProcedure() == null)
        throw new DomainRuntimeException("PatientProcedure ID cannot be null.");

    DomainFactory factory = getDomainFactory();
    PatientProcedure doPatProcedure = (PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedureRefVo.getID_PatientProcedure());
    return PatientProcedureVoAssembler.create(doPatProcedure);
}
项目:openMAXIMS    文件:PatientProceduresImpl.java   
public PatientProcedureVoCollection listClinicalContactProcedures(ClinicalContactShortVo voClinicalContactShort, CareContextShortVo careContext)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (careContext != null)
    {
        hql.append(andStr + " t.careContext.id = :ccid");
        markers.add("ccid");
        values.add(careContext.getID_CareContext());
        andStr = " and ";
    }
    else if (voClinicalContactShort != null)
    {
        hql.append(andStr + " t.clinicalContact.id = :rcc");
        markers.add("rcc");
        values.add(new Boolean(true));
        andStr = " and ";

    }

    hql.append(andStr + " t.procedureStatus = :perf");
    markers.add("perf");
    values.add(getDomLookup(PatientProcedureStatus.PERFORMED));
    andStr = " and ";

    if (markers.size() > 0)
        query += " where t.class is null  and";
    query += hql.toString();

    List patientProcedureList = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientProcedureList).sort();

}
项目:openMAXIMS    文件:PatientProceduresImpl.java   
public PatientProcedureVo getPatientProcedure(PatientProcedureRefVo procedureRef)
{
    if (procedureRef == null || !procedureRef.getID_PatientProcedureIsNotNull())
        return null;

    return PatientProcedureVoAssembler.create((PatientProcedure) getDomainFactory().getDomainObject(PatientProcedure.class, procedureRef.getID_PatientProcedure()));
}
项目:openMAXIMS    文件:IntraOperativeCareRecordImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.core.vo.PatientProcedureVo getProcedure(ims.core.clinical.vo.PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:openmaxims-linux    文件:PlannedProcedureImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedureRefVo)
{
    if( patientProcedureRefVo == null)
        throw new DomainRuntimeException("PatientProcedure cannot be null.");

    if( patientProcedureRefVo.getID_PatientProcedure() == null)
        throw new DomainRuntimeException("PatientProcedure ID cannot be null.");

    DomainFactory factory = getDomainFactory();
    PatientProcedure doPatProcedure = (PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedureRefVo.getID_PatientProcedure());
    return PatientProcedureVoAssembler.create(doPatProcedure);
}
项目:openmaxims-linux    文件:PatientProceduresImpl.java   
public PatientProcedureVoCollection listClinicalContactProcedures(ClinicalContactShortVo voClinicalContactShort, CareContextShortVo careContext)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PatientProcedure t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (careContext != null)
    {
        hql.append(andStr + " t.careContext.id = :ccid");
        markers.add("ccid");
        values.add(careContext.getID_CareContext());
        andStr = " and ";
    }
    else if (voClinicalContactShort != null)
    {
        hql.append(andStr + " t.clinicalContact.id = :rcc");
        markers.add("rcc");
        values.add(new Boolean(true));
        andStr = " and ";

    }

    hql.append(andStr + " t.procedureStatus = :perf");
    markers.add("perf");
    values.add(getDomLookup(PatientProcedureStatus.PERFORMED));
    andStr = " and ";

    if (markers.size() > 0)
        query += " where t.class is null  and";
    query += hql.toString();

    List patientProcedureList = factory.find(query, markers, values);
    return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientProcedureList).sort();

}
项目:openmaxims-linux    文件:PatientProceduresImpl.java   
public PatientProcedureVo getPatientProcedure(PatientProcedureRefVo procedureRef)
{
    if (procedureRef == null || !procedureRef.getID_PatientProcedureIsNotNull())
        return null;

    return PatientProcedureVoAssembler.create((PatientProcedure) getDomainFactory().getDomainObject(PatientProcedure.class, procedureRef.getID_PatientProcedure()));
}
项目:openmaxims-linux    文件:IntraOperativeCareRecordImpl.java   
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目:openmaxims-linux    文件:CataractIntraOperativeCareRecordImpl.java   
public ims.core.vo.PatientProcedureVo getProcedure(ims.core.clinical.vo.PatientProcedureRefVo patientProcedure)
{
    if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null)
        throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure");

    DomainFactory factory = getDomainFactory();

    return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure()));
}
项目: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    文件:SurgicalOperationNotesImpl.java   
public PatientProcedureVo getPlannedProcedure(IntraOperativeCareRecordRefVo iocr) 
{
    if(iocr == null || iocr.getID_IntraOperativeCareRecord() == null)
        throw new CodingRuntimeException("Can not get PlannedProcedure on null IntraOperativeCareRecord Id.");

    DomainFactory factory = getDomainFactory();

    String hql = "select iocr.plannedProcedure from IntraOperativeCareRecord as iocr where iocr.id = :Iocr and iocr.isRIE is null";

    PatientProcedure plannedProcedure = (PatientProcedure) factory.findFirst(hql, new String[] {"Iocr"}, new Object[] {iocr.getID_IntraOperativeCareRecord()});

    return PatientProcedureVoAssembler.create(plannedProcedure);
}
项目: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    文件:SurgicalOperationNotesImpl.java   
public PatientProcedureVo getPlannedProcedure(IntraOperativeCareRecordRefVo iocr) 
{
    if(iocr == null || iocr.getID_IntraOperativeCareRecord() == null)
        throw new CodingRuntimeException("Can not get PlannedProcedure on null IntraOperativeCareRecord Id.");

    DomainFactory factory = getDomainFactory();

    String hql = "select iocr.plannedProcedure from IntraOperativeCareRecord as iocr where iocr.id = :Iocr and iocr.isRIE is null";

    PatientProcedure plannedProcedure = (PatientProcedure) factory.findFirst(hql, new String[] {"Iocr"}, new Object[] {iocr.getID_IntraOperativeCareRecord()});

    return PatientProcedureVoAssembler.create(plannedProcedure);
}
项目: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    文件:SurgicalOperationNotesImpl.java   
public PatientProcedureVo getPlannedProcedure(IntraOperativeCareRecordRefVo iocr) 
{
    if(iocr == null || iocr.getID_IntraOperativeCareRecord() == null)
        throw new CodingRuntimeException("Can not get PlannedProcedure on null IntraOperativeCareRecord Id.");

    DomainFactory factory = getDomainFactory();

    String hql = "select iocr.plannedProcedure from IntraOperativeCareRecord as iocr where iocr.id = :Iocr and iocr.isRIE is null";

    PatientProcedure plannedProcedure = (PatientProcedure) factory.findFirst(hql, new String[] {"Iocr"}, new Object[] {iocr.getID_IntraOperativeCareRecord()});

    return PatientProcedureVoAssembler.create(plannedProcedure);
}
项目: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;
}