Index: Common.h =================================================================== diff -u -r8aaed7c1ca12351dd2435a488b1f8abbcb9420b9 -r79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6 --- Common.h (.../Common.h) (revision 8aaed7c1ca12351dd2435a488b1f8abbcb9420b9) +++ Common.h (.../Common.h) (revision 79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6) @@ -453,6 +453,13 @@ U32 cmd; ///< DG sample water command. } DG_SAMPLE_WATER_CMD_REQUEST_T; +/// DG institutional values structure as part of HD institutional values. +typedef struct +{ + U32 minRORejectionRatioPCT; ///< Min RO rejection ratio in percent. + F32 minInletWaterCondAlarmLimitUSPCM; ///< Min inlet water conductivity alarm limit in uS/cm. +} DG_INSTITUTIONAL_VALUES_T; + #pragma pack(push, 1) /// DG usage info structure. typedef struct Index: NVDataMgmt.c =================================================================== diff -u -r8aaed7c1ca12351dd2435a488b1f8abbcb9420b9 -r79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 8aaed7c1ca12351dd2435a488b1f8abbcb9420b9) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision 79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6) @@ -131,6 +131,8 @@ #define DEFAULT_BLOOD_LEAK_SET_POINT 20 ///< Blood leak default set point. #define DEFAULT_HEPARIN_PUMP_VOLTAGE 0.15F ///< Heparin pump default voltage. #define DEFAULT_ENABLE_CHEM_DISINFECT 0 ///< Disable chemical disinfect in institutional record. +#define DEFAULT_MAX_RO_REJECTION_RATIO_PCT 90 ///< Max RO rejection ratio in percent. +#define DEFAULT_MIN_INLET_WATER_COND_ALARM_US_P_CM 200.0F ///< Min inlet water conductivity alarm limit in uS/cm. #endif // DG specific defines @@ -946,6 +948,8 @@ institMsg.hdr.msgID = 0; institMsg.hdr.payloadLen = 0; handleSendInstitutionalRecordToUI( &institMsg ); + // Received new institutional record and it is valid, send it to the DG to be up to date + handleDGRequestInstitutionalValues( &institMsg ); #endif // Signal that there is a new calibration record available. @@ -1543,6 +1547,32 @@ return status; } + +/*********************************************************************//** + * @brief + * The getMinRORejectionRatioInInstitRecordPCT returns the value of the min RO + * rejection ratio in institutional record in percent + * @details Inputs: hdInstitutionalGroup + * Output: none + * @return the min RO rejection ratio in institutional record in percent + *************************************************************************/ +U32 getMinRORejectionRatioInInstitRecordPCT( void ) +{ + return hdInstitutionalGroup.hdInstitutionalRecord.minRORejectionRatioPCT; +} + +/*********************************************************************//** + * @brief + * The getMinInletWaterConductivityLimitInstitRecord returns the value of + * the inlet water conductivity alarm limit in uS/cm in institutional record + * @details Inputs: hdInstitutionalGroup + * Output: none + * @return the inlet water conductivity alarm limit in uS/cm in institutional record + *************************************************************************/ +F32 getMinInletWaterConductivityLimitInstitRecordUSPCM( void ) +{ + return hdInstitutionalGroup.hdInstitutionalRecord.minInletWaterCondAlarmLimitUSPCM; +} #endif #ifdef _DG_ /*********************************************************************//** @@ -3941,6 +3971,8 @@ hdInstitutionalGroup.hdInstitutionalRecord.minHeparinBolusVolumeML = getF32DefaultTreatmentParamEdge( TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME, TRUE ); hdInstitutionalGroup.hdInstitutionalRecord.maxHeparinBolusVolumeML = getF32DefaultTreatmentParamEdge( TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME, FALSE ); hdInstitutionalGroup.hdInstitutionalRecord.enableChemicalDisinfect = DEFAULT_ENABLE_CHEM_DISINFECT; + hdInstitutionalGroup.hdInstitutionalRecord.minRORejectionRatioPCT = DEFAULT_MAX_RO_REJECTION_RATIO_PCT; + hdInstitutionalGroup.hdInstitutionalRecord.minInletWaterCondAlarmLimitUSPCM = DEFAULT_MIN_INLET_WATER_COND_ALARM_US_P_CM; hdInstitutionalGroup.hdInstitutionalRecord.calibrationTime = getRTCTimestamp(); hdInstitutionalGroup.hdInstitutionalRecord.crc = crc16 ( (U08*)&hdInstitutionalGroup.hdInstitutionalRecord, sizeof( HD_INSTITUTIONAL_RECORD_T ) - sizeof( U16 ) ); Index: NVDataMgmt.h =================================================================== diff -u -r8aaed7c1ca12351dd2435a488b1f8abbcb9420b9 -r79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6 --- NVDataMgmt.h (.../NVDataMgmt.h) (revision 8aaed7c1ca12351dd2435a488b1f8abbcb9420b9) +++ NVDataMgmt.h (.../NVDataMgmt.h) (revision 79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6) @@ -148,6 +148,8 @@ BOOL setTxTimeHours( F32 hours ); BOOL setTxLastStartTimeEpoch( U32 epoch ); BOOL isChemDisinfectEnabledInInstitRecord( void ); +U32 getMinRORejectionRatioInInstitRecordPCT( void ); +F32 getMinInletWaterConductivityLimitInstitRecordUSPCM( void ); #endif BOOL setServiceTime( void ); Index: NVDataMgmtHDRecords.h =================================================================== diff -u -r8aaed7c1ca12351dd2435a488b1f8abbcb9420b9 -r79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6 --- NVDataMgmtHDRecords.h (.../NVDataMgmtHDRecords.h) (revision 8aaed7c1ca12351dd2435a488b1f8abbcb9420b9) +++ NVDataMgmtHDRecords.h (.../NVDataMgmtHDRecords.h) (revision 79f1d27d0b9f34bd86c93cddbb98ef0bfa4bbbf6) @@ -294,6 +294,8 @@ F32 minHeparinBolusVolumeML; ///< Min heparin bolus volume in mL. F32 maxHeparinBolusVolumeML; ///< Max heparin bolus volume in mL. U32 enableChemicalDisinfect; ///< Enable/disable chemical disinfect. + U32 minRORejectionRatioPCT; ///< Min RO rejection ratio in percent. + F32 minInletWaterCondAlarmLimitUSPCM; ///< Min inlet water conductivity alarm limit in uS/cm. U32 calibrationTime; ///< Calibration time in epoch. U16 crc; ///< CRC of the institutional record. } HD_INSTITUTIONAL_RECORD_T;