Skip to content

Commit

Permalink
Merge pull request #287 from hpi-sam/285-data-set-corrections
Browse files Browse the repository at this point in the history
285 data set corrections
  • Loading branch information
Wolkenfarmer authored Jun 17, 2024
2 parents 5a31cb8 + b9b40fe commit 6b9ba53
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def handle(self, *args, **kwargs):
def create_actions():
"""
"category": Action.Category.TREATMENT, // category as defined in Action, short form
"location": BE, : 60, // application duration in seconds
"location": BE, // location where action is conducted
"relocates": false // boolean indicating whether action relocates the patient or not
"application_duration: 60, // application duration in seconds
"effect_duration": 60, // effect duration in seconds; None means permanent
"conditions": {
"required_actions": ["A1uuid", "A2uuid", ["A3uuid", "A4uuid"]], // this means action1 AND action2 AND (action3 OR action4); can be None
Expand Down Expand Up @@ -923,11 +925,7 @@ def create_actions():
"effect_duration": None,
"conditions": {
"required_actions": [
[
str(ActionIDs.TRACHEALTUBUS),
str(ActionIDs.LARYNXTUBUS),
str(ActionIDs.LARYNXMASKE),
],
str(ActionIDs.TRACHEALTUBUS),
],
"prohibitive_actions": None,
"material": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ def handle(self, *args, **kwargs):
)

def create_subconditions(self):
"""
name="Lyse", // name of subcondition
upper_limit=CUSTOM_MAXINT, // maximum number of occurrences of fulfilling actions or fulfilling materials
lower_limit=1, // minimum number of occurrences of fulfilling actions or fulfilling materials
fulfilling_measures={
"actions": [str(ActionIDs.LYSE_VERARBREICHEN)],
"materials": [],
}, // actions / materials that fulfill this subcondition. everything is or-connected. and-connection is not possible with current implementation
"""

# corresponds to "Lyse"
Subcondition.objects.update_or_create(
name="Lyse",
Expand Down Expand Up @@ -127,7 +137,10 @@ def create_subconditions(self):
upper_limit=CUSTOM_MAXINT,
lower_limit=1,
fulfilling_measures={
"actions": [str(ActionIDs.SAUERSTOFF_ANBRINGEN)],
"actions": [
str(ActionIDs.SAUERSTOFF_ANBRINGEN),
str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN),
],
"materials": [],
},
)
Expand All @@ -154,7 +167,10 @@ def create_subconditions(self):
upper_limit=CUSTOM_MAXINT,
lower_limit=1,
fulfilling_measures={
"actions": [str(ActionIDs.SAUERSTOFF_ANBRINGEN)],
"actions": [
str(ActionIDs.SAUERSTOFF_ANBRINGEN),
str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN),
],
"materials": [],
},
)
Expand Down Expand Up @@ -194,9 +210,16 @@ def create_subconditions(self):
upper_limit=CUSTOM_MAXINT,
lower_limit=1,
fulfilling_measures={
"actions": [],
"actions": [
str(ActionIDs.STABILE_SEITENLAGE),
str(ActionIDs.GUEDELTUBUS),
str(ActionIDs.WENDELTUBUS),
str(ActionIDs.TRACHEALTUBUS),
str(ActionIDs.LARYNXMASKE),
str(ActionIDs.LARYNXTUBUS),
],
"materials": [],
}, # add "Tubus" things here?
},
)
# corresponds to "EK´s"
Subcondition.objects.update_or_create(
Expand Down Expand Up @@ -891,10 +914,7 @@ def parse_patient_data(self, patient_code):
return patient_states


# TODO: how do we check "freie Atemwege"? this doesn't depend on measures, instead its in the patient state data
# TODO: which action corresponds to "Infusion"?
# TODO: add action for Operation, then also add to corresponding Subcondition
# TODO: which action corresponds to "O2 Inhalation", same for O2?
# TODO: which action corresponds to "CPAP"?
# TODO: are there more "Blutstillungen" than "Chir. Blutstillung"?
# TODO: patient 1036 has no value for ZVD

0 comments on commit 6b9ba53

Please sign in to comment.