Skip to content

Commit

Permalink
remove the old microbiology input service and move the logic into the…
Browse files Browse the repository at this point in the history
… clinical advice service so all our clinical advice logic is done in one place
  • Loading branch information
fredkingham committed Apr 9, 2020
1 parent e3b93f0 commit 3a208b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
1 change: 0 additions & 1 deletion elcid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class Application(application.OpalApplication):
'js/elcid/filters.js',
'js/elcid/directives.js',
'js/elcid/controllers/discharge.js',
'js/elcid/services/records/microbiology_input.js',
'js/elcid/controllers/clinical_timeline.js',
'js/elcid/controllers/welcome.js',
'js/elcid/controllers/lab_test_json_dump_view.js',
Expand Down
3 changes: 3 additions & 0 deletions elcid/assets/js/elcid/services/clinical_advice.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ angular.module('opal.services').service('ClinicalAdvice', function($http, $q, $w
};
}
}
else{
this.editing.when = new Date();
}
}

elementName(prefix){
Expand Down
16 changes: 0 additions & 16 deletions elcid/assets/js/elcid/services/records/microbiology_input.js

This file was deleted.

4 changes: 2 additions & 2 deletions elcid/assets/js/elcidtest/clinical_advice.service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ describe('ClinicalAdvice', function(){
expect(clinicalAdvice.editing.micro_input_icu_round_relation.icu_round.ventilated).toBe(true);
});

it('should construct the editing object with item', function(){
it('should construct the editing object without item', function(){
var clinicalAdvice = new ClinicalAdvice();
expect(clinicalAdvice.isNew).toBe(true);
expect(clinicalAdvice.editing.micro_input_icu_round_relation.observation).toEqual({});
expect(clinicalAdvice.editing.micro_input_icu_round_relation.icu_round).toEqual({});
expect(_.isDate(clinicalAdvice.editing.when)).toBe(true);
});
});

Expand Down
1 change: 0 additions & 1 deletion elcid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ class MicrobiologyInput(EpisodeSubrecord):
_icon = 'fa fa-comments'
_modal = 'lg'
_list_limit = 3
_angular_service = 'MicrobiologyInput'
ICU_REASON_FOR_INTERACTION = "ICU round"

when = models.DateTimeField(null=True, blank=True)
Expand Down

0 comments on commit 3a208b2

Please sign in to comment.