File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
ui/app/common/domain/services Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,10 @@ angular.module('bahmni.common.domain')
1212 var existingConditions = _ . filter ( conditionsToBeSaved , function ( condition ) {
1313 return condition . uuid ;
1414 } ) ;
15-
15+ conditionsToBeSaved = newConditions . length ? newConditions : existingConditions ;
1616 var promises = [ ] ;
1717
18- if ( newConditions . length > 0 ) {
19- _ . forEach ( newConditions , function ( conditionToSave ) {
18+ _ . forEach ( conditionsToBeSaved , function ( conditionToSave ) {
2019 var body = {
2120 patient : patientUuid ,
2221 clinicalStatus : conditionToSave . status ,
@@ -39,15 +38,6 @@ angular.module('bahmni.common.domain')
3938 } ) ;
4039
4140 return promises [ promises . length - 1 ] ;
42- }
43-
44- return {
45- then : function ( callback ) {
46- if ( callback ) callback ( { data : existingConditions } ) ;
47- return this ;
48- } ,
49- catch : function ( ) { return this ; }
50- } ;
5141 } ;
5242 this . getConditionHistory = function ( patientUuid ) {
5343 var params = {
You can’t perform that action at this time.
0 commit comments