Index: firmware/App/Modes/ModeTreatmentParams.c =================================================================== diff -u -r5a6f0b9a41702cf284db0a356261da21f06c0bfc -rdda00e22238de3058df3a55dbd408f9f5098f433 --- firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision 5a6f0b9a41702cf284db0a356261da21f06c0bfc) +++ firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision dda00e22238de3058df3a55dbd408f9f5098f433) @@ -737,7 +737,6 @@ if ( param < NUM_OF_TREATMENT_PARAMS ) { - //result = TREAT_PARAMS_PROPERTIES[ param ].min.sInt; CRITICAL_DATAS_T value; getInstitutionalRecordEdgeValue( param, &value, TRUE ); result = value.sInt; @@ -765,7 +764,6 @@ if ( param < NUM_OF_TREATMENT_PARAMS ) { - //result = TREAT_PARAMS_PROPERTIES[ param ].max.sInt; CRITICAL_DATAS_T value; getInstitutionalRecordEdgeValue( param, &value, FALSE ); result = value.sInt; @@ -793,7 +791,6 @@ if ( param < NUM_OF_TREATMENT_PARAMS ) { - //result = TREAT_PARAMS_PROPERTIES[ param ].min.uInt; CRITICAL_DATAS_T value; getInstitutionalRecordEdgeValue( param, &value, TRUE ); result = value.uInt; @@ -821,7 +818,6 @@ if ( param < NUM_OF_TREATMENT_PARAMS ) { - //result = TREAT_PARAMS_PROPERTIES[ param ].max.uInt; CRITICAL_DATAS_T value; getInstitutionalRecordEdgeValue( param, &value, FALSE ); result = value.uInt; @@ -849,7 +845,6 @@ if ( param < NUM_OF_TREATMENT_PARAMS ) { - //result = TREAT_PARAMS_PROPERTIES[ param ].min.sFlt; CRITICAL_DATAS_T value; getInstitutionalRecordEdgeValue( param, &value, TRUE ); result = value.sFlt; @@ -877,7 +872,6 @@ if ( param < NUM_OF_TREATMENT_PARAMS ) { - //result = TREAT_PARAMS_PROPERTIES[ param ].max.sFlt; CRITICAL_DATAS_T value; getInstitutionalRecordEdgeValue( param, &value, FALSE ); result = value.sFlt; @@ -1308,120 +1302,65 @@ { case TREATMENT_PARAM_BLOOD_FLOW: value->uInt = ( TRUE == isMin ? hdInstitutionalRecord.minBloodFlowMLPM : hdInstitutionalRecord.maxBloodFlowMLPM ); - - - //result = ( ( value.uInt >= hdInstitutionalRecord.minBloodFlowMLPM ) && - // ( value.uInt <= hdInstitutionalRecord.maxBloodFlowMLPM ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_DIALYSATE_FLOW: value->uInt = ( TRUE == isMin ? hdInstitutionalRecord.minDialysateFlowMLPM : hdInstitutionalRecord.maxDialysateFlowMLPM ); - - //result = ( ( value.uInt >= hdInstitutionalRecord.minDialysateFlowMLPM ) && - // ( value.uInt <= hdInstitutionalRecord.maxDialysateFlowMLPM ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_TREATMENT_DURATION: value->uInt = ( TRUE == isMin ? hdInstitutionalRecord.minTxDurationMIN : hdInstitutionalRecord.maxTxDurationMIN ); - - //result = ( ( value.uInt >= hdInstitutionalRecord.minTxDurationMIN ) && - // ( value.uInt <= hdInstitutionalRecord.maxTxDurationMIN ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_HEPARIN_PRE_STOP_TIME: value->uInt = ( TRUE == isMin ? hdInstitutionalRecord.minStopHeparinDispBeforeTxEndMIN : hdInstitutionalRecord.maxStopHeparinDispBeforeTxEndMIN ); - - /*result = ( ( value.uInt >= hdInstitutionalRecord.minStopHeparinDispBeforeTxEndMIN ) && - ( value.uInt <= hdInstitutionalRecord.maxStopHeparinDispBeforeTxEndMIN ) ? TRUE : FALSE ); - // The value of the heparin pre stop time should only be checked if the heparin dispense rate in not zero. - // If the stop time is outside of range but the heparin dispense rate is 0, this item has passed regardless. - // If the stop time is outside of range and the heparin is not 0, then this item has failed. - // Staged params is directly used because the heparin dispense rate is check after the stop so we need to know about it - // prior to checking later in this switch case - result |= ( stagedParams[ TREATMENT_PARAM_HEPARIN_DISPENSE_RATE ].sFlt <= NEARLY_ZERO ? TRUE : FALSE ); - */ break; case TREATMENT_PARAM_SALINE_BOLUS_VOLUME: value->uInt = ( TRUE == isMin ? hdInstitutionalRecord.minSalineBolusVolumeML : hdInstitutionalRecord.maxSalineBolusVolumeML ); - - /*result = ( ( value.uInt >= hdInstitutionalRecord.minSalineBolusVolumeML ) && - ( value.uInt <= hdInstitutionalRecord.maxSalineBolusVolumeML ) ? TRUE : FALSE ); - */ break; case TREATMENT_PARAM_DIALYSATE_TEMPERATURE: value->sFlt = ( TRUE == isMin ? hdInstitutionalRecord.minDialysateTempC : hdInstitutionalRecord.maxDialysateTempC ); - - //result = ( ( value.sFlt >= hdInstitutionalRecord.minDialysateTempC ) && - // ( value.sFlt <= hdInstitutionalRecord.maxDialysateTempC ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_ART_PRES_LIMIT_WINDOW: value->sInt = ( TRUE == isMin ? hdInstitutionalRecord.minArtPressLimitWindowMMHG : hdInstitutionalRecord.maxArtPressLimitWindowMMHG ); - - //result = ( ( value.sInt >= hdInstitutionalRecord.minArtPressLimitWindowMMHG ) && - // ( value.sInt <= hdInstitutionalRecord.maxArtPressLimitWindowMMHG ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_VEN_PRES_LIMIT_WINDOW: value->sInt = ( TRUE == isMin ? hdInstitutionalRecord.minVenPressLimitWindowMMHG : hdInstitutionalRecord.maxVenPressLimitWindowMMHG ); - - //result = ( ( value.sInt >= hdInstitutionalRecord.minVenPressLimitWindowMMHG ) && - // ( value.sInt <= hdInstitutionalRecord.maxVenPressLimitWindowMMHG ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_VEN_PRES_LIMIT_ASYMMETRIC: value->sInt = ( TRUE == isMin ? hdInstitutionalRecord.minVenAsymPressLimitMMHG : hdInstitutionalRecord.maxVenAsymPressLimitMMHG ); - - //result = ( ( value.sInt >= hdInstitutionalRecord.minVenAsymPressLimitMMHG ) && - // ( value.sInt <= hdInstitutionalRecord.maxVenAsymPressLimitMMHG ) ? TRUE : FALSE ); break; case TREATMENT_PARAM_UF_VOLUME: value->sFlt = ( TRUE == isMin ? hdInstitutionalRecord.minUFVolumeL : hdInstitutionalRecord.maxUFVolumeL ); - //result = ( ( value.sFlt >= hdInstitutionalRecord.minUFVolumeL ) && ( value.sFlt <= hdInstitutionalRecord.maxUFVolumeL ) ? TRUE : FALSE ); - //result |= ( value.sFlt <= NEARLY_ZERO ? TRUE : FALSE ); // There might be a minimum UF volume set in the institutional record but a treatment with 0 vol should be allowed break; case TREATMENT_PARAM_HEPARIN_DISPENSE_RATE: value->sFlt = ( TRUE == isMin ? hdInstitutionalRecord.minHeparinDispRateMLPHR : hdInstitutionalRecord.maxHeparinDispRateMLPHR ); - - //result = ( ( value.sFlt >= hdInstitutionalRecord.minHeparinDispRateMLPHR ) && - // ( value.sFlt <= hdInstitutionalRecord.maxHeparinDispRateMLPHR ) ? TRUE : FALSE ); - //result |= ( value.sFlt <= NEARLY_ZERO ? TRUE : FALSE ); // Even if the minimum is not 0, 0 is accepted meaning heparin can be turned off break; case TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME: value->sFlt = ( TRUE == isMin ? hdInstitutionalRecord.minHeparinBolusVolumeML : hdInstitutionalRecord.maxHeparinBolusVolumeML ); - - //result = ( ( value.sFlt >= hdInstitutionalRecord.minHeparinBolusVolumeML ) && - // ( value.sFlt <= hdInstitutionalRecord.maxHeparinBolusVolumeML ) ? TRUE : FALSE ); - //result |= ( value.sFlt <= NEARLY_ZERO ? TRUE : FALSE ); // Even if the minimum is not 0, 0 is accepted meaning heparin can be turned off break; default: // The treatment parameters that do not have any institutional record. if ( CRITICAL_DATA_TYPE_U32 == TREAT_PARAMS_PROPERTIES[ param ].dataType ) { value->uInt = ( TRUE == isMin ? TREAT_PARAMS_PROPERTIES[ param ].min.uInt : TREAT_PARAMS_PROPERTIES[ param ].max.uInt ); - - //result = ( ( value.uInt >= TREAT_PARAMS_PROPERTIES[ param ].min.uInt ) && - // ( value.uInt <= TREAT_PARAMS_PROPERTIES[ param ].max.uInt ) ? TRUE : FALSE ); } else if ( CRITICAL_DATA_TYPE_S32 == TREAT_PARAMS_PROPERTIES[ param ].dataType ) { value->sInt = ( TRUE == isMin ? TREAT_PARAMS_PROPERTIES[ param ].min.sInt : TREAT_PARAMS_PROPERTIES[ param ].max.sInt ); - - //result = ( ( value.sInt >= TREAT_PARAMS_PROPERTIES[ param ].min.sInt ) && - // ( value.sInt <= TREAT_PARAMS_PROPERTIES[ param ].max.sInt ) ? TRUE : FALSE ); } else { value->sFlt = ( TRUE == isMin ? TREAT_PARAMS_PROPERTIES[ param ].min.sFlt : TREAT_PARAMS_PROPERTIES[ param ].max.sFlt ); - - //result = ( ( value.sFlt >= TREAT_PARAMS_PROPERTIES[ param ].min.sFlt ) && - // ( value.sFlt <= TREAT_PARAMS_PROPERTIES[ param ].max.sFlt ) ? TRUE : FALSE ); } } }