Skip to content

Commit

Permalink
#330 backend: update continuous_variables_data for more realistic run…
Browse files Browse the repository at this point in the history
… time
  • Loading branch information
Wolkenfarmer committed Oct 16, 2024
1 parent 14deec8 commit 6656c81
Showing 1 changed file with 84 additions and 14 deletions.
98 changes: 84 additions & 14 deletions backend/dps_training_k/data/continuous_variables_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,55 @@ def update_or_create_continuous_variables():
uuid=ContinuousVariableIDs.SPO2,
defaults={
"name": ContinuousVariable.Variable.SPO2,
"function": ContinuousVariable.Function.LINEAR,
"function": ContinuousVariable.Function.SIGMOID,
"exceptions": [
{
"actions": [str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN)],
"actions": [
str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN),
str(ActionIDs.SAUERSTOFF_ANBRINGEN),
[
str(ActionIDs.ANALGETIKUM),
str(ActionIDs.ANTIKOAGULANZ),
str(ActionIDs.ERYTHROZYTENKONZENTRATE_ANWENDEN),
],
],
"materials": [
str(MaterialIDs.BEATMUNGSGERAET_STATIONAER),
str(MaterialIDs.BEATMUNGSGERAET_TRAGBAR),
[
str(MaterialIDs.FRESH_FROZEN_PLASMA),
str(MaterialIDs.LAB_GERAET_1),
str(MaterialIDs.LAB_GERAET_2),
],
],
"function": ContinuousVariable.Function.LINEAR,
"function": ContinuousVariable.Function.INCREMENT,
},
{
"actions": [
[str(ActionIDs.IV_ZUGANG), str(ActionIDs.DRUCKVERBAND)]
str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN),
[
str(ActionIDs.ANALGETIKUM),
str(ActionIDs.ANTIKOAGULANZ),
],
],
"materials": [
[str(MaterialIDs.EKG), str(MaterialIDs.BZ_MESSGERAET)]
str(MaterialIDs.BEATMUNGSGERAET_STATIONAER),
[
str(MaterialIDs.FRESH_FROZEN_PLASMA),
str(MaterialIDs.LAB_GERAET_1),
],
],
"function": ContinuousVariable.Function.DECREMENT,
"function": ContinuousVariable.Function.LINEAR,
},
{
"actions": [str(ActionIDs.IV_ZUGANG)],
"materials": [str(MaterialIDs.EKG)],
"function": ContinuousVariable.Function.INCREMENT,
"actions": [str(ActionIDs.TURNIQUET)],
"materials": [],
"function": ContinuousVariable.Function.SIGMOID_DELAYED,
},
{
"actions": [str(ActionIDs.IV_ZUGANG)],
"materials": [],
"function": ContinuousVariable.Function.SIGMOID,
"actions": [],
"materials": [str(MaterialIDs.BZ_MESSGERAET)],
"function": ContinuousVariable.Function.SIGMOID_DELAYED,
},
],
},
Expand All @@ -54,7 +75,56 @@ def update_or_create_continuous_variables():
uuid=ContinuousVariableIDs.HEART_RATE,
defaults={
"name": ContinuousVariable.Variable.HEART_RATE,
"function": ContinuousVariable.Function.SIGMOID_DELAYED,
"exceptions": [],
"function": ContinuousVariable.Function.SIGMOID,
"exceptions": [
{
"actions": [
str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN),
str(ActionIDs.SAUERSTOFF_ANBRINGEN),
[
str(ActionIDs.ANALGETIKUM),
str(ActionIDs.ANTIKOAGULANZ),
str(ActionIDs.ERYTHROZYTENKONZENTRATE_ANWENDEN),
],
],
"materials": [
str(MaterialIDs.BEATMUNGSGERAET_STATIONAER),
str(MaterialIDs.BEATMUNGSGERAET_TRAGBAR),
[
str(MaterialIDs.FRESH_FROZEN_PLASMA),
str(MaterialIDs.LAB_GERAET_1),
str(MaterialIDs.LAB_GERAET_2),
],
],
"function": ContinuousVariable.Function.INCREMENT,
},
{
"actions": [
str(ActionIDs.BEATMUNGSGERAET_ANBRINGEN),
[
str(ActionIDs.ANALGETIKUM),
str(ActionIDs.ANTIKOAGULANZ),
],
],
"materials": [
str(MaterialIDs.BEATMUNGSGERAET_STATIONAER),
[
str(MaterialIDs.FRESH_FROZEN_PLASMA),
str(MaterialIDs.LAB_GERAET_1),
],
],
"function": ContinuousVariable.Function.LINEAR,
},
{
"actions": [str(ActionIDs.TURNIQUET)],
"materials": [],
"function": ContinuousVariable.Function.SIGMOID_DELAYED,
},
{
"actions": [],
"materials": [str(MaterialIDs.BZ_MESSGERAET)],
"function": ContinuousVariable.Function.SIGMOID_DELAYED,
},
],
},
)

0 comments on commit 6656c81

Please sign in to comment.