Java 类ims.clinical.vo.IntraOperativeCareRecordVo 实例源码

项目: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    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearIntraOperativeCareRecords();

    if (currentRecord == null)
        return;

    populateIntraOperativeCareRecords(currentRecord);
    populateIntraOperativeDetails(currentRecord.getIntraOperativeDetails());
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearCataractIntraOperativeCareRecords();
    clearCataractIntraOperativeDetails();

    if (currentRecord == null)
        return;

    populateCataractIntraOperativeCareRecords(currentRecord);
    populateCataractIntraOperativeDetails(currentRecord.getCataractIntraOperativeDetail());

}
项目:AvoinApotti    文件:Logic.java   
private void populateCataractIntraOperativeCareRecords(IntraOperativeCareRecordVo currentRecord)
{
    if (currentRecord == null)
        return;

    form.lyrMain().tabCareRecord().ccAuth().setValue(currentRecord.getAuthoringInformationIsNotNull() ? currentRecord.getAuthoringInformation() : null);

    form.lyrMain().tabCareRecord().ccPlannedProcedure().setValue(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog());

    form.lyrMain().tabCareRecord().ccActualProcedurePerformed().setValue(currentRecord.getActualProcedureIsNotNull() ? currentRecord.getActualProcedure() : null);

    form.lyrMain().tabCareRecord().dteDate().setValue(currentRecord.getProcedureDateIsNotNull() ? currentRecord.getProcedureDate() : null);

    if (currentRecord.getTheatreIsNotNull())
    {
        form.lyrMain().tabCareRecord().cmbTheatre().newRow(currentRecord.getTheatre(), currentRecord.getTheatre().getName());
        form.lyrMain().tabCareRecord().cmbTheatre().setValue(currentRecord.getTheatre());
    }
    form.lyrMain().tabCareRecord().dtimInTheatreTime().setValue(currentRecord.getInTheatreTimeIsNotNull() ? currentRecord.getInTheatreTime() : null);
    //form.lyrMain().tabCareRecord().dtimOutTheatreTime().setValue(currentRecord.getOutTheatreTimeIsNotNull() ? currentRecord.getOutTheatreTime() : null); //wdev-11676
    form.lyrMain().tabCareRecord().dtimSurgeryStart().setValue(currentRecord.getSurgeryStartTimeIsNotNull() ? currentRecord.getSurgeryStartTime() : null);
    form.lyrMain().tabCareRecord().dtimSurgeryFinish().setValue(currentRecord.getSurgeryEndTimeIsNotNull() ? currentRecord.getSurgeryEndTime() : null);
    form.lyrMain().tabCareRecord().dtimAnaesthetistS().setValue(currentRecord.getAnaesthetistStartTimeIsNotNull() ? currentRecord.getAnaesthetistStartTime() : null);
    form.lyrMain().tabCareRecord().ccSurgeon().setValue(currentRecord.getSurgeonIsNotNull() ? currentRecord.getSurgeon() : null);
    form.lyrMain().tabCareRecord().ccSurgeonAssistant().setValue(currentRecord.getSurgeonAssistantIsNotNull() ? currentRecord.getSurgeonAssistant() : null);
    form.lyrMain().tabCareRecord().ccAnaesthetist().setValue(currentRecord.getAnaesthetistIsNotNull() ? currentRecord.getAnaesthetist() : null);
    form.lyrMain().tabCareRecord().ccODAODP().setValue(currentRecord.getODAIsNotNull() ? currentRecord.getODA() : null);
    form.lyrMain().tabCareRecord().ccScrubNurse().setValue(currentRecord.getScrubNurseIsNotNull() ? currentRecord.getScrubNurse() : null);
    form.lyrMain().tabCareRecord().ccCirculatingNurse().setValue(currentRecord.getCirculatingNurseIsNotNull() ? currentRecord.getCirculatingNurse() : null);
    form.lyrMain().tabCareRecord().txtOther().setValue(currentRecord.getOtherIsNotNull() ? currentRecord.getOther() : null);
    form.lyrMain().tabCareRecord().PlannedUnplanned().setValue(currentRecord.getWasPlannedProcedureIsNotNull() && currentRecord.getWasPlannedProcedure() ? PlannedUnplannedEnumeration.rdoPlanned : PlannedUnplannedEnumeration.rdoUnplanned);
}
项目: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    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearIntraOperativeCareRecords();

    if (currentRecord == null)
        return;

    populateIntraOperativeCareRecords(currentRecord);
    populateIntraOperativeDetails(currentRecord.getIntraOperativeDetails());
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearCataractIntraOperativeCareRecords();
    clearCataractIntraOperativeDetails();

    if (currentRecord == null)
        return;

    populateCataractIntraOperativeCareRecords(currentRecord);
    populateCataractIntraOperativeDetails(currentRecord.getCataractIntraOperativeDetail());

}
项目:openMAXIMS    文件:Logic.java   
private void populateCataractIntraOperativeCareRecords(IntraOperativeCareRecordVo currentRecord)
{
    if (currentRecord == null)
        return;

    form.lyrMain().tabCareRecord().ccAuth().setValue(currentRecord.getAuthoringInformationIsNotNull() ? currentRecord.getAuthoringInformation() : null);

    form.lyrMain().tabCareRecord().ccPlannedProcedure().setValue(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog());

    form.lyrMain().tabCareRecord().ccActualProcedurePerformed().setValue(currentRecord.getActualProcedureIsNotNull() ? currentRecord.getActualProcedure() : null);

    form.lyrMain().tabCareRecord().dteDate().setValue(currentRecord.getProcedureDateIsNotNull() ? currentRecord.getProcedureDate() : null);

    if (currentRecord.getTheatreIsNotNull())
    {
        form.lyrMain().tabCareRecord().cmbTheatre().newRow(currentRecord.getTheatre(), currentRecord.getTheatre().getName());
        form.lyrMain().tabCareRecord().cmbTheatre().setValue(currentRecord.getTheatre());
    }
    form.lyrMain().tabCareRecord().dtimInTheatreTime().setValue(currentRecord.getInTheatreTimeIsNotNull() ? currentRecord.getInTheatreTime() : null);
    //form.lyrMain().tabCareRecord().dtimOutTheatreTime().setValue(currentRecord.getOutTheatreTimeIsNotNull() ? currentRecord.getOutTheatreTime() : null); //wdev-11676
    form.lyrMain().tabCareRecord().dtimSurgeryStart().setValue(currentRecord.getSurgeryStartTimeIsNotNull() ? currentRecord.getSurgeryStartTime() : null);
    form.lyrMain().tabCareRecord().dtimSurgeryFinish().setValue(currentRecord.getSurgeryEndTimeIsNotNull() ? currentRecord.getSurgeryEndTime() : null);
    form.lyrMain().tabCareRecord().dtimAnaesthetistS().setValue(currentRecord.getAnaesthetistStartTimeIsNotNull() ? currentRecord.getAnaesthetistStartTime() : null);
    form.lyrMain().tabCareRecord().ccSurgeon().setValue(currentRecord.getSurgeonIsNotNull() ? currentRecord.getSurgeon() : null);
    form.lyrMain().tabCareRecord().ccSurgeonAssistant().setValue(currentRecord.getSurgeonAssistantIsNotNull() ? currentRecord.getSurgeonAssistant() : null);
    form.lyrMain().tabCareRecord().ccAnaesthetist().setValue(currentRecord.getAnaesthetistIsNotNull() ? currentRecord.getAnaesthetist() : null);
    form.lyrMain().tabCareRecord().ccODAODP().setValue(currentRecord.getODAIsNotNull() ? currentRecord.getODA() : null);
    form.lyrMain().tabCareRecord().ccScrubNurse().setValue(currentRecord.getScrubNurseIsNotNull() ? currentRecord.getScrubNurse() : null);
    form.lyrMain().tabCareRecord().ccCirculatingNurse().setValue(currentRecord.getCirculatingNurseIsNotNull() ? currentRecord.getCirculatingNurse() : null);
    form.lyrMain().tabCareRecord().txtOther().setValue(currentRecord.getOtherIsNotNull() ? currentRecord.getOther() : null);
    form.lyrMain().tabCareRecord().PlannedUnplanned().setValue(currentRecord.getWasPlannedProcedureIsNotNull() && currentRecord.getWasPlannedProcedure() ? PlannedUnplannedEnumeration.rdoPlanned : PlannedUnplannedEnumeration.rdoUnplanned);
}
项目: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    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearIntraOperativeCareRecords();

    if (currentRecord == null)
        return;

    populateIntraOperativeCareRecords(currentRecord);
    populateIntraOperativeDetails(currentRecord.getIntraOperativeDetails());
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearCataractIntraOperativeCareRecords();
    clearCataractIntraOperativeDetails();

    if (currentRecord == null)
        return;

    populateCataractIntraOperativeCareRecords(currentRecord);
    populateCataractIntraOperativeDetails(currentRecord.getCataractIntraOperativeDetail());

}
项目:openMAXIMS    文件:Logic.java   
private void populateCataractIntraOperativeCareRecords(IntraOperativeCareRecordVo currentRecord)
{
    if (currentRecord == null)
        return;

    form.lyrMain().tabCareRecord().ccAuth().setValue(currentRecord.getAuthoringInformationIsNotNull() ? currentRecord.getAuthoringInformation() : null);

    form.lyrMain().tabCareRecord().ccPlannedProcedure().setValue(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog());

    form.lyrMain().tabCareRecord().ccActualProcedurePerformed().setValue(currentRecord.getActualProcedureIsNotNull() ? currentRecord.getActualProcedure() : null);

    form.lyrMain().tabCareRecord().dteDate().setValue(currentRecord.getProcedureDateIsNotNull() ? currentRecord.getProcedureDate() : null);

    if (currentRecord.getTheatreIsNotNull())
    {
        form.lyrMain().tabCareRecord().cmbTheatre().newRow(currentRecord.getTheatre(), currentRecord.getTheatre().getName());
        form.lyrMain().tabCareRecord().cmbTheatre().setValue(currentRecord.getTheatre());
    }
    form.lyrMain().tabCareRecord().dtimInTheatreTime().setValue(currentRecord.getInTheatreTimeIsNotNull() ? currentRecord.getInTheatreTime() : null);
    //form.lyrMain().tabCareRecord().dtimOutTheatreTime().setValue(currentRecord.getOutTheatreTimeIsNotNull() ? currentRecord.getOutTheatreTime() : null); //wdev-11676
    form.lyrMain().tabCareRecord().dtimSurgeryStart().setValue(currentRecord.getSurgeryStartTimeIsNotNull() ? currentRecord.getSurgeryStartTime() : null);
    form.lyrMain().tabCareRecord().dtimSurgeryFinish().setValue(currentRecord.getSurgeryEndTimeIsNotNull() ? currentRecord.getSurgeryEndTime() : null);
    form.lyrMain().tabCareRecord().dtimAnaesthetistS().setValue(currentRecord.getAnaesthetistStartTimeIsNotNull() ? currentRecord.getAnaesthetistStartTime() : null);
    form.lyrMain().tabCareRecord().ccSurgeon().setValue(currentRecord.getSurgeonIsNotNull() ? currentRecord.getSurgeon() : null);
    form.lyrMain().tabCareRecord().ccSurgeonAssistant().setValue(currentRecord.getSurgeonAssistantIsNotNull() ? currentRecord.getSurgeonAssistant() : null);
    form.lyrMain().tabCareRecord().ccAnaesthetist().setValue(currentRecord.getAnaesthetistIsNotNull() ? currentRecord.getAnaesthetist() : null);
    form.lyrMain().tabCareRecord().ccODAODP().setValue(currentRecord.getODAIsNotNull() ? currentRecord.getODA() : null);
    form.lyrMain().tabCareRecord().ccScrubNurse().setValue(currentRecord.getScrubNurseIsNotNull() ? currentRecord.getScrubNurse() : null);
    form.lyrMain().tabCareRecord().ccCirculatingNurse().setValue(currentRecord.getCirculatingNurseIsNotNull() ? currentRecord.getCirculatingNurse() : null);
    form.lyrMain().tabCareRecord().txtOther().setValue(currentRecord.getOtherIsNotNull() ? currentRecord.getOther() : null);
    form.lyrMain().tabCareRecord().PlannedUnplanned().setValue(currentRecord.getWasPlannedProcedureIsNotNull() && currentRecord.getWasPlannedProcedure() ? PlannedUnplannedEnumeration.rdoPlanned : PlannedUnplannedEnumeration.rdoUnplanned);
}
项目: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    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearIntraOperativeCareRecords();

    if (currentRecord == null)
        return;

    populateIntraOperativeCareRecords(currentRecord);
    populateIntraOperativeDetails(currentRecord.getIntraOperativeDetails());
}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControls(IntraOperativeCareRecordVo currentRecord)
{
    clearCataractIntraOperativeCareRecords();
    clearCataractIntraOperativeDetails();

    if (currentRecord == null)
        return;

    populateCataractIntraOperativeCareRecords(currentRecord);
    populateCataractIntraOperativeDetails(currentRecord.getCataractIntraOperativeDetail());

}
项目:openmaxims-linux    文件:Logic.java   
private void populateCataractIntraOperativeCareRecords(IntraOperativeCareRecordVo currentRecord)
{
    if (currentRecord == null)
        return;

    form.lyrMain().tabCareRecord().ccAuth().setValue(currentRecord.getAuthoringInformationIsNotNull() ? currentRecord.getAuthoringInformation() : null);

    form.lyrMain().tabCareRecord().ccPlannedProcedure().setValue(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog());

    form.lyrMain().tabCareRecord().ccActualProcedurePerformed().setValue(currentRecord.getActualProcedureIsNotNull() ? currentRecord.getActualProcedure() : null);

    form.lyrMain().tabCareRecord().dteDate().setValue(currentRecord.getProcedureDateIsNotNull() ? currentRecord.getProcedureDate() : null);

    if (currentRecord.getTheatreIsNotNull())
    {
        form.lyrMain().tabCareRecord().cmbTheatre().newRow(currentRecord.getTheatre(), currentRecord.getTheatre().getName());
        form.lyrMain().tabCareRecord().cmbTheatre().setValue(currentRecord.getTheatre());
    }
    form.lyrMain().tabCareRecord().dtimInTheatreTime().setValue(currentRecord.getInTheatreTimeIsNotNull() ? currentRecord.getInTheatreTime() : null);
    //form.lyrMain().tabCareRecord().dtimOutTheatreTime().setValue(currentRecord.getOutTheatreTimeIsNotNull() ? currentRecord.getOutTheatreTime() : null); //wdev-11676
    form.lyrMain().tabCareRecord().dtimSurgeryStart().setValue(currentRecord.getSurgeryStartTimeIsNotNull() ? currentRecord.getSurgeryStartTime() : null);
    form.lyrMain().tabCareRecord().dtimSurgeryFinish().setValue(currentRecord.getSurgeryEndTimeIsNotNull() ? currentRecord.getSurgeryEndTime() : null);
    form.lyrMain().tabCareRecord().dtimAnaesthetistS().setValue(currentRecord.getAnaesthetistStartTimeIsNotNull() ? currentRecord.getAnaesthetistStartTime() : null);
    form.lyrMain().tabCareRecord().ccSurgeon().setValue(currentRecord.getSurgeonIsNotNull() ? currentRecord.getSurgeon() : null);
    form.lyrMain().tabCareRecord().ccSurgeonAssistant().setValue(currentRecord.getSurgeonAssistantIsNotNull() ? currentRecord.getSurgeonAssistant() : null);
    form.lyrMain().tabCareRecord().ccAnaesthetist().setValue(currentRecord.getAnaesthetistIsNotNull() ? currentRecord.getAnaesthetist() : null);
    form.lyrMain().tabCareRecord().ccODAODP().setValue(currentRecord.getODAIsNotNull() ? currentRecord.getODA() : null);
    form.lyrMain().tabCareRecord().ccScrubNurse().setValue(currentRecord.getScrubNurseIsNotNull() ? currentRecord.getScrubNurse() : null);
    form.lyrMain().tabCareRecord().ccCirculatingNurse().setValue(currentRecord.getCirculatingNurseIsNotNull() ? currentRecord.getCirculatingNurse() : null);
    form.lyrMain().tabCareRecord().txtOther().setValue(currentRecord.getOtherIsNotNull() ? currentRecord.getOther() : null);
    form.lyrMain().tabCareRecord().PlannedUnplanned().setValue(currentRecord.getWasPlannedProcedureIsNotNull() && currentRecord.getWasPlannedProcedure() ? PlannedUnplannedEnumeration.rdoPlanned : PlannedUnplannedEnumeration.rdoUnplanned);
}
项目: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    文件:Logic.java   
private void populateIntraOperativeCareRecords(IntraOperativeCareRecordVo currentRecord)
{
    if (currentRecord == null)
        return;

    form.lyr1().tabCareRecord().ccAuth().setValue(currentRecord.getAuthoringInformationIsNotNull() ? currentRecord.getAuthoringInformation() : null);

    form.lyr1().tabCareRecord().ccPlannedProcedure().setValue(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog());

    form.lyr1().tabCareRecord().ccActualProcedurePerformed().setValue(currentRecord.getActualProcedureIsNotNull() ? currentRecord.getActualProcedure() : null);

    form.lyr1().tabCareRecord().dteDate().setValue(currentRecord.getProcedureDateIsNotNull() ? currentRecord.getProcedureDate() : null);
    if (currentRecord.getTheatreIsNotNull())
    {
        form.lyr1().tabCareRecord().cmbTheatre().newRow(currentRecord.getTheatre(), currentRecord.getTheatre().getName());
        form.lyr1().tabCareRecord().cmbTheatre().setValue(currentRecord.getTheatre());
    }
    form.lyr1().tabCareRecord().dtimInTheatreTime().setValue(currentRecord.getInTheatreTimeIsNotNull() ? currentRecord.getInTheatreTime() : null);

    //wdev-12096
    //form.lyr1().tabCareRecord().txtAnaestheticUsed().setValue(currentRecord.getAnaestheticUsedIsNotNull() ? currentRecord.getAnaestheticUsed():null);
    form.lyr1().tabCareRecord().cmbAnaestheticUsed().setValue(currentRecord.getAnaestheticUsedIsNotNull() ? currentRecord.getAnaestheticUsed():null); //wdev-13774
    form.lyr1().tabCareRecord().dtimTimeIntoPACU().setValue(currentRecord.getIntoPacuTimeIsNotNull() ? currentRecord.getIntoPacuTime():null);
    form.lyr1().tabCareRecord().dtimStageOneRecovery().setValue(currentRecord.getTimeIntoRecoveryIsNotNull() ? currentRecord.getTimeIntoRecovery():null);
    form.lyr1().tabCareRecord().dtimTimeOutOfRecovery().setValue(currentRecord.getTimeOutOfRecoveryIsNotNull() ? currentRecord.getTimeOutOfRecovery():null);

    //WDEV-12173
    Booking_AppointmentShortVo voAppt = domain.getTheatreApptForIntraOperativeCareRecord(currentRecord);
    if(voAppt != null && voAppt.getAppointmentDateIsNotNull())
        form.lyr1().tabCareRecord().cmbTheatreBooking().newRow(voAppt, voAppt.getAppointmentDate().toString()+(voAppt.getApptStartTime()!=null?" "+
                voAppt.getApptStartTime().toString():(voAppt.getTheatreBookingIsNotNull()&&voAppt.getTheatreBooking().getTCITimeIsNotNull()?" "+voAppt.getTheatreBooking().getTCITime().getText():"")));

    form.lyr1().tabCareRecord().cmbTheatreBooking().setValue(voAppt);

    //-------------
    form.lyr1().tabCareRecord().dtimSurgeryStart().setValue(currentRecord.getSurgeryStartTimeIsNotNull() ? currentRecord.getSurgeryStartTime() : null);
    form.lyr1().tabCareRecord().dtimSurgeryFinish().setValue(currentRecord.getSurgeryEndTimeIsNotNull() ? currentRecord.getSurgeryEndTime() : null);

    form.lyr1().tabCareRecord().dtimAnaesthetistS().setValue(currentRecord.getAnaesthetistStartTimeIsNotNull() ? currentRecord.getAnaesthetistStartTime() : null);
    form.lyr1().tabCareRecord().ccSurgeon().setValue(currentRecord.getSurgeonIsNotNull() ? currentRecord.getSurgeon() : null);
    form.lyr1().tabCareRecord().ccSurgeonAssistant().setValue(currentRecord.getSurgeonAssistantIsNotNull() ? currentRecord.getSurgeonAssistant() : null);
    form.lyr1().tabCareRecord().ccAnaesthetist().setValue(currentRecord.getAnaesthetistIsNotNull() ? currentRecord.getAnaesthetist() : null);
    form.lyr1().tabCareRecord().ccODAODP().setValue(currentRecord.getODAIsNotNull() ? currentRecord.getODA() : null);
    form.lyr1().tabCareRecord().ccScrubNurse().setValue(currentRecord.getScrubNurseIsNotNull() ? currentRecord.getScrubNurse() : null);
    form.lyr1().tabCareRecord().ccCirculatingNurse().setValue(currentRecord.getCirculatingNurseIsNotNull() ? currentRecord.getCirculatingNurse() : null);

    form.lyr1().tabCareRecord().txtOther().setValue(currentRecord.getOtherIsNotNull() ? currentRecord.getOther() : null);

    form.lyr1().tabCareRecord().PlannedUnplanned().setValue(currentRecord.getWasPlannedProcedureIsNotNull() && currentRecord.getWasPlannedProcedure() ? PlannedUnplannedEnumeration.rdoPlanned : PlannedUnplannedEnumeration.rdoUnplanned);
}
项目: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;
}
项目:AvoinApotti    文件:IntraOperativeCareRecordImpl.java   
public void rieIntraOperativeCareRecordAndActualProcedure(IntraOperativeCareRecordVo iocr, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String comment) throws StaleObjectException
{
    // Rie both the IntraOperativeCareRecord and the actual procedure in the same transaction.
    try
    {
        // WDEV-13476
        // Also remove the link from the Planned procedure
        if (iocr.getPlannedProcedureIsNotNull())
        {
            PatientProcedure domainPlannedProcedure = (PatientProcedure) getDomainFactory().getDomainObject(PatientProcedure.class, iocr.getPlannedProcedure().getID_PatientProcedure());

            domainPlannedProcedure.setIntraOperativeRecord(null);

            getDomainFactory().save(domainPlannedProcedure);
        }

        if (iocr.getActualProcedureIsNotNull())
            markAsRie(iocr.getActualProcedure(), formName, patientId, contactId, careContextId, comment);
        markAsRie(iocr, formName, patientId, contactId, careContextId, comment);
    }
    catch (UnqViolationUncheckedException e)
    {
        // Standard RIE procedure does a get before the save so will never throw a stale.
        // But, on every RIE a new RecordedInError record is create . This bo contains an unique key (boClassId,className).
        // So this UnqViolationUncheckedException might be actually an Stale (somebody already ried this record).
        // Verify if there is an RecordedInError record(either core.clinical.PatientProcedure or core.clinical.IntraOperativeCareRecord). If yes throw Stale
        StringBuilder hql = new StringBuilder("select count(rie.id) from RecordedInError as rie where ((rie.boClassId = :iocrId and rie.className = :iocrClass)");
        String[] paramNames;
        Object[] paramValues;
        if (iocr.getActualProcedureIsNotNull())
        {
            hql.append("or  (rie.boClassId = :procId and rie.className = :procClass)");
            paramNames = new String[] { "iocrId", "iocrClass", "procId", "procClass" };
            paramValues = new Object[] { iocr.getBoId(), iocr.getBoClassName(), iocr.getActualProcedure().getBoId(), iocr.getActualProcedure().getBoClassName() };
        }
        else
        {
            paramNames = new String[] { "iocrId", "iocrClass" };
            paramValues = new Object[] { iocr.getBoId(), iocr.getBoClassName() };

        }
        hql.append(")");

        long count = getDomainFactory().countWithHQL(hql.toString(), paramNames, paramValues);
        if (count > 0)
            throw new StaleObjectException(null);

    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateIntraOperativeCareRecords(IntraOperativeCareRecordVo currentRecord)
{
    if (currentRecord == null)
        return;

    form.lyr1().tabCareRecord().ccAuth().setValue(currentRecord.getAuthoringInformationIsNotNull() ? currentRecord.getAuthoringInformation() : null);

    form.lyr1().tabCareRecord().ccPlannedProcedure().setValue(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog());

    form.lyr1().tabCareRecord().ccActualProcedurePerformed().setValue(currentRecord.getActualProcedureIsNotNull() ? currentRecord.getActualProcedure() : null);

    form.lyr1().tabCareRecord().dteDate().setValue(currentRecord.getProcedureDateIsNotNull() ? currentRecord.getProcedureDate() : null);
    if (currentRecord.getTheatreIsNotNull())
    {
        form.lyr1().tabCareRecord().cmbTheatre().newRow(currentRecord.getTheatre(), currentRecord.getTheatre().getName());
        form.lyr1().tabCareRecord().cmbTheatre().setValue(currentRecord.getTheatre());
    }
    form.lyr1().tabCareRecord().dtimInTheatreTime().setValue(currentRecord.getInTheatreTimeIsNotNull() ? currentRecord.getInTheatreTime() : null);

    //wdev-12096
    //form.lyr1().tabCareRecord().txtAnaestheticUsed().setValue(currentRecord.getAnaestheticUsedIsNotNull() ? currentRecord.getAnaestheticUsed():null);
    form.lyr1().tabCareRecord().cmbAnaestheticUsed().setValue(currentRecord.getAnaestheticUsedIsNotNull() ? currentRecord.getAnaestheticUsed():null); //wdev-13774
    form.lyr1().tabCareRecord().dtimTimeIntoPACU().setValue(currentRecord.getIntoPacuTimeIsNotNull() ? currentRecord.getIntoPacuTime():null);
    form.lyr1().tabCareRecord().dtimStageOneRecovery().setValue(currentRecord.getTimeIntoRecoveryIsNotNull() ? currentRecord.getTimeIntoRecovery():null);
    form.lyr1().tabCareRecord().dtimTimeOutOfRecovery().setValue(currentRecord.getTimeOutOfRecoveryIsNotNull() ? currentRecord.getTimeOutOfRecovery():null);

    //WDEV-12173
    Booking_AppointmentShortVo voAppt = domain.getTheatreApptForIntraOperativeCareRecord(currentRecord);
    if(voAppt != null && voAppt.getAppointmentDateIsNotNull())
        form.lyr1().tabCareRecord().cmbTheatreBooking().newRow(voAppt, voAppt.getAppointmentDate().toString()+(voAppt.getApptStartTime()!=null?" "+
                voAppt.getApptStartTime().toString():(voAppt.getTheatreBookingIsNotNull()&&voAppt.getTheatreBooking().getTCITimeIsNotNull()?" "+voAppt.getTheatreBooking().getTCITime().getText():"")));

    form.lyr1().tabCareRecord().cmbTheatreBooking().setValue(voAppt);

    //-------------
    form.lyr1().tabCareRecord().dtimSurgeryStart().setValue(currentRecord.getSurgeryStartTimeIsNotNull() ? currentRecord.getSurgeryStartTime() : null);
    form.lyr1().tabCareRecord().dtimSurgeryFinish().setValue(currentRecord.getSurgeryEndTimeIsNotNull() ? currentRecord.getSurgeryEndTime() : null);

    form.lyr1().tabCareRecord().dtimAnaesthetistS().setValue(currentRecord.getAnaesthetistStartTimeIsNotNull() ? currentRecord.getAnaesthetistStartTime() : null);
    form.lyr1().tabCareRecord().ccSurgeon().setValue(currentRecord.getSurgeonIsNotNull() ? currentRecord.getSurgeon() : null);
    form.lyr1().tabCareRecord().ccSurgeonAssistant().setValue(currentRecord.getSurgeonAssistantIsNotNull() ? currentRecord.getSurgeonAssistant() : null);
    form.lyr1().tabCareRecord().ccAnaesthetist().setValue(currentRecord.getAnaesthetistIsNotNull() ? currentRecord.getAnaesthetist() : null);
    form.lyr1().tabCareRecord().ccODAODP().setValue(currentRecord.getODAIsNotNull() ? currentRecord.getODA() : null);
    form.lyr1().tabCareRecord().ccScrubNurse().setValue(currentRecord.getScrubNurseIsNotNull() ? currentRecord.getScrubNurse() : null);
    form.lyr1().tabCareRecord().ccCirculatingNurse().setValue(currentRecord.getCirculatingNurseIsNotNull() ? currentRecord.getCirculatingNurse() : null);

    form.lyr1().tabCareRecord().txtOther().setValue(currentRecord.getOtherIsNotNull() ? currentRecord.getOther() : null);

    form.lyr1().tabCareRecord().PlannedUnplanned().setValue(currentRecord.getWasPlannedProcedureIsNotNull() && currentRecord.getWasPlannedProcedure() ? PlannedUnplannedEnumeration.rdoPlanned : PlannedUnplannedEnumeration.rdoUnplanned);
}
项目: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;
}