Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiService.scope.$watchCollection(function()
- {
- //var val = apiService.model.findSuccessorWithPath(_vitals.PRESSURE).getValueNodeParentRef().length;
- //Get values
- var systolicValues = EhrFormHelpers.getMultiMagnitudeValuesOrZero(apiService, _vitals.PRESSURE_SYSTOLIC); //Vrne []
- var diastolicValues = EhrFormHelpers.getMultiMagnitudeValuesOrZero(apiService, _vitals.PRESSURE_DIASTOLIC);
- if (systolicValues.length > 0 && diastolicValues.length > 0)
- {
- return [systolicValues, diastolicValues];
- }
- return [];
- }, function(newValue, oldValue)
- {
- var equal = true;
- //Check all fields
- for (var i = 0; i < newValue[0].length; i++)
- {
- if (newValue[0][i] != oldValue[0][i])
- {
- equal = false;
- break;
- }
- else if (newValue[1][i] != oldValue[1][i])
- {
- equal = false;
- break;
- }
- }
- if (!equal)
- {
- _vitals.recalculatePreasureAll();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement