Add PSQI #36
3 changed files with 242 additions and 7 deletions
209
entry.html
209
entry.html
|
|
@ -82,6 +82,9 @@
|
||||||
<line class="inm-line" id="line-enable-tug-v"/>
|
<line class="inm-line" id="line-enable-tug-v"/>
|
||||||
<line class="inm-line" id="line-enable-tug-h"/>
|
<line class="inm-line" id="line-enable-tug-h"/>
|
||||||
|
|
||||||
|
<line class="inm-line" id="line-enable-psqi-v"/>
|
||||||
|
<line class="inm-line" id="line-enable-psqi-h"/>
|
||||||
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -98,7 +101,7 @@
|
||||||
|
|
||||||
<form class="needs-validation" id="entry-form" novalidate>
|
<form class="needs-validation" id="entry-form" novalidate>
|
||||||
|
|
||||||
<input type="text" id="form-data-version" name="form-data-version" style="visibility: hidden;" value="2.2">
|
<input type="text" id="form-data-version" name="form-data-version" style="visibility: hidden;" value="2.3">
|
||||||
<input type="text" id="data-entry-domain" name="data-entry-domain" style="visibility: hidden;" value="de.sfb1451.z03">
|
<input type="text" id="data-entry-domain" name="data-entry-domain" style="visibility: hidden;" value="de.sfb1451.z03">
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2069,6 +2072,173 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- PSQI -->
|
||||||
|
<div class="row pt-4">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-leader"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi"
|
||||||
|
data-inm-switch-group="enable-psqi-sleep-quality;enable-psqi-sleep-latency;enable-psqi-sleep-duration;enable-psqi-sleep-efficiency;enable-psqi-sleep-disturbance;enable-psqi-meds;enable-psqi-day-dysfunction"
|
||||||
|
data-inm-lines="line-enable-psqi-v;line-enable-psqi-h"
|
||||||
|
data-inm-line-end="enable-psqi-day-dysfunction"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-11">
|
||||||
|
<h5>PSQI</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-sleep-quality"
|
||||||
|
data-inm-controlled-inputs="psqi-sleep-quality"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-sleep-quality">Schlafqualität</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-sleep-quality" name="psqi-sleep-quality" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-sleep-latency"
|
||||||
|
data-inm-controlled-inputs="psqi-sleep-latency"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-sleep-latency">Schlaflatenz</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-sleep-latency" name="psqi-sleep-latency" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-sleep-duration"
|
||||||
|
data-inm-controlled-inputs="psqi-sleep-duration"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-sleep-duration">Schlafdauer</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-sleep-duration" name="psqi-sleep-duration" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-sleep-efficiency"
|
||||||
|
data-inm-controlled-inputs="psqi-sleep-efficiency"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-sleep-efficiency">Schlafeffizienz</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-sleep-efficiency" name="psqi-sleep-efficiency" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-sleep-disturbance"
|
||||||
|
data-inm-controlled-inputs="psqi-sleep-disturbance"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-sleep-disturbance">Schlafstörungen</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-sleep-disturbance" name="psqi-sleep-disturbance" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-meds"
|
||||||
|
data-inm-controlled-inputs="psqi-meds"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-meds">Schlafmittelkonsum</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-meds" name="psqi-meds" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1 form-switch">
|
||||||
|
<input class="form-check-input group-member"
|
||||||
|
type="checkbox"
|
||||||
|
id="enable-psqi-day-dysfunction"
|
||||||
|
data-inm-controlled-inputs="psqi-day-dysfunction"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-day-dysfunction">Tagesmüdigkeit</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-day-dysfunction" name="psqi-day-dysfunction" min="0" max="3" step="1" placeholder="0 - 3" required oninput="psqiSum();">
|
||||||
|
<div class="invalid-feedback field-validity">
|
||||||
|
Ganzzahl zwischen 0 und 3 erwartet.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row pt-2">
|
||||||
|
<div class="col-lg-1">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<label for="psqi-sum">PSQI Gesamtsumme</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 entry-value">
|
||||||
|
<input type="number" class="form-control" id="psqi-sum" name="psqi-sum" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Weitere Diagnostik -->
|
<!-- Weitere Diagnostik -->
|
||||||
<div class="row pt-5">
|
<div class="row pt-5">
|
||||||
|
|
@ -2688,6 +2858,21 @@
|
||||||
dest_element.value = sumString;
|
dest_element.value = sumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function psqiSum() {
|
||||||
|
let source_elements = [
|
||||||
|
document.getElementById("psqi-sleep-quality"),
|
||||||
|
document.getElementById("psqi-sleep-latency"),
|
||||||
|
document.getElementById("psqi-sleep-duration"),
|
||||||
|
document.getElementById("psqi-sleep-efficiency"),
|
||||||
|
document.getElementById("psqi-sleep-disturbance"),
|
||||||
|
document.getElementById("psqi-meds"),
|
||||||
|
document.getElementById("psqi-day-dysfunction"),
|
||||||
|
];
|
||||||
|
let sumString = sumInputs(source_elements);
|
||||||
|
let dest_element = document.getElementById("psqi-sum");
|
||||||
|
dest_element.value = sumString;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -2815,6 +3000,13 @@
|
||||||
["euroqol-code", getStringContent],
|
["euroqol-code", getStringContent],
|
||||||
["euroqol-vas", getNumberContent],
|
["euroqol-vas", getNumberContent],
|
||||||
["isced-value", getNumberContent],
|
["isced-value", getNumberContent],
|
||||||
|
["psqi-sleep-quality", getNumberContent],
|
||||||
|
["psqi-sleep-latency", getNumberContent],
|
||||||
|
["psqi-sleep-duration", getNumberContent],
|
||||||
|
["psqi-sleep-efficiency", getNumberContent],
|
||||||
|
["psqi-sleep-disturbance", getNumberContent],
|
||||||
|
["psqi-meds", getNumberContent],
|
||||||
|
["psqi-day-dysfunction", getNumberContent],
|
||||||
["additional-mrt-url", getStringContent],
|
["additional-mrt-url", getStringContent],
|
||||||
["additional-mrt-resting-state", getCheckboxContent],
|
["additional-mrt-resting-state", getCheckboxContent],
|
||||||
["additional-mrt-tapping-task", getCheckboxContent],
|
["additional-mrt-tapping-task", getCheckboxContent],
|
||||||
|
|
@ -2973,7 +3165,8 @@
|
||||||
"enable-kopss",
|
"enable-kopss",
|
||||||
"enable-moto-test",
|
"enable-moto-test",
|
||||||
"enable-tmt",
|
"enable-tmt",
|
||||||
"enable-tug"
|
"enable-tug",
|
||||||
|
"enable-psqi"
|
||||||
];
|
];
|
||||||
|
|
||||||
function changeGroupedSwitches(changeEvent) {
|
function changeGroupedSwitches(changeEvent) {
|
||||||
|
|
@ -3044,7 +3237,14 @@
|
||||||
"enable-tmt-a",
|
"enable-tmt-a",
|
||||||
"enable-tmt-b",
|
"enable-tmt-b",
|
||||||
"enable-tug-executed",
|
"enable-tug-executed",
|
||||||
"enable-tug-imagined"
|
"enable-tug-imagined",
|
||||||
|
"enable-psqi-sleep-quality",
|
||||||
|
"enable-psqi-sleep-latency",
|
||||||
|
"enable-psqi-sleep-duration",
|
||||||
|
"enable-psqi-sleep-efficiency",
|
||||||
|
"enable-psqi-sleep-disturbance",
|
||||||
|
"enable-psqi-meds",
|
||||||
|
"enable-psqi-day-dysfunction"
|
||||||
];
|
];
|
||||||
|
|
||||||
function changeControlledInputs(changeEvent) {
|
function changeControlledInputs(changeEvent) {
|
||||||
|
|
@ -3082,6 +3282,7 @@
|
||||||
"enable-moto-test",
|
"enable-moto-test",
|
||||||
"enable-tmt",
|
"enable-tmt",
|
||||||
"enable-tug",
|
"enable-tug",
|
||||||
|
"enable-psqi",
|
||||||
];
|
];
|
||||||
|
|
||||||
function updatedLines() {
|
function updatedLines() {
|
||||||
|
|
@ -3182,6 +3383,7 @@
|
||||||
"kopss-sum",
|
"kopss-sum",
|
||||||
"acl-k-sum",
|
"acl-k-sum",
|
||||||
"demtect-sum",
|
"demtect-sum",
|
||||||
|
"psqi-sum",
|
||||||
"additional-mrt-url",
|
"additional-mrt-url",
|
||||||
"additional-mrt-resting-state",
|
"additional-mrt-resting-state",
|
||||||
"additional-mrt-resting-state-valid",
|
"additional-mrt-resting-state-valid",
|
||||||
|
|
@ -3367,6 +3569,7 @@
|
||||||
kopssSum();
|
kopssSum();
|
||||||
aclKSum();
|
aclKSum();
|
||||||
demtectSum();
|
demtectSum();
|
||||||
|
psqiSum();
|
||||||
}
|
}
|
||||||
|
|
||||||
function readSavedJSON() {
|
function readSavedJSON() {
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,13 @@ required_fields = [
|
||||||
"euroqol-code",
|
"euroqol-code",
|
||||||
"euroqol-vas",
|
"euroqol-vas",
|
||||||
"isced-value",
|
"isced-value",
|
||||||
|
"psqi-sleep-quality",
|
||||||
|
"psqi-sleep-latency",
|
||||||
|
"psqi-sleep-duration",
|
||||||
|
"psqi-sleep-efficiency",
|
||||||
|
"psqi-sleep-disturbance",
|
||||||
|
"psqi-meds",
|
||||||
|
"psqi-day-dysfunction",
|
||||||
"additional-mrt-url",
|
"additional-mrt-url",
|
||||||
"additional-mrt-resting-state",
|
"additional-mrt-resting-state",
|
||||||
"additional-mrt-tapping-task",
|
"additional-mrt-tapping-task",
|
||||||
|
|
@ -212,6 +219,14 @@ auto_fields = {
|
||||||
"euroqol-vas": [""],
|
"euroqol-vas": [""],
|
||||||
"isced-value": [""],
|
"isced-value": [""],
|
||||||
|
|
||||||
|
"psqi-sleep-quality": [""],
|
||||||
|
"psqi-sleep-latency": [""],
|
||||||
|
"psqi-sleep-duration": [""],
|
||||||
|
"psqi-sleep-efficiency": [""],
|
||||||
|
"psqi-sleep-disturbance": [""],
|
||||||
|
"psqi-meds": [""],
|
||||||
|
"psqi-day-dysfunction": [""],
|
||||||
|
|
||||||
"additional-mrt-url": [""],
|
"additional-mrt-url": [""],
|
||||||
"additional-mrt-resting-state": ["off"],
|
"additional-mrt-resting-state": ["off"],
|
||||||
"additional-mrt-tapping-task": ["off"],
|
"additional-mrt-tapping-task": ["off"],
|
||||||
|
|
@ -473,6 +488,13 @@ hashed_content_fields = [
|
||||||
["euroqol-code", get_string_content],
|
["euroqol-code", get_string_content],
|
||||||
["euroqol-vas", get_number_content],
|
["euroqol-vas", get_number_content],
|
||||||
["isced-value", get_number_content],
|
["isced-value", get_number_content],
|
||||||
|
["psqi-sleep-quality", get_number_content],
|
||||||
|
["psqi-sleep-latency", get_number_content],
|
||||||
|
["psqi-sleep-duration", get_number_content],
|
||||||
|
["psqi-sleep-efficiency", get_number_content],
|
||||||
|
["psqi-sleep-disturbance", get_number_content],
|
||||||
|
["psqi-meds", get_number_content],
|
||||||
|
["psqi-day-dysfunction", get_number_content],
|
||||||
["additional-mrt-url", get_string_content],
|
["additional-mrt-url", get_string_content],
|
||||||
["additional-mrt-resting-state", get_checkbox_content],
|
["additional-mrt-resting-state", get_checkbox_content],
|
||||||
["additional-mrt-tapping-task", get_checkbox_content],
|
["additional-mrt-tapping-task", get_checkbox_content],
|
||||||
|
|
@ -599,6 +621,13 @@ field_value_fetcher = {
|
||||||
"euroqol-code": get_string_value,
|
"euroqol-code": get_string_value,
|
||||||
"euroqol-vas": get_int_value,
|
"euroqol-vas": get_int_value,
|
||||||
"isced-value": get_int_value,
|
"isced-value": get_int_value,
|
||||||
|
"psqi-sleep-quality": get_int_value,
|
||||||
|
"psqi-sleep-latency": get_int_value,
|
||||||
|
"psqi-sleep-duration": get_int_value,
|
||||||
|
"psqi-sleep-efficiency": get_int_value,
|
||||||
|
"psqi-sleep-disturbance": get_int_value,
|
||||||
|
"psqi-meds": get_int_value,
|
||||||
|
"psqi-day-dysfunction": get_int_value,
|
||||||
"additional-mrt": get_checkbox_value,
|
"additional-mrt": get_checkbox_value,
|
||||||
"additional-mrt-url": get_string_value,
|
"additional-mrt-url": get_string_value,
|
||||||
"additional-mrt-resting-state": get_checkbox_value,
|
"additional-mrt-resting-state": get_checkbox_value,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,10 @@ from store_data import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
minimal_form_data = """form-data-version=2.2&data-entry-domain=de.sfb1451.z03&data-entry-employee=cm-test&project-code=b4&subject-pseudonym=test-111&date-of-birth=2000-01-01&sex=male&date-of-test=2020-01-01&subject-group=healthy&patient-year-first-symptom=&patient-month-first-symptom=&patient-day-first-symptom=&patient-year-diagnosis=&patient-month-diagnosis=&patient-day-diagnosis=&additional-remarks=&hashed-string=form-data-version%3A2.2%3Bdata-entry-domain%3Ade.sfb1451.z03%3Bdata-entry-employee%3Acm-test%3Bproject-code%3Ab4%3Bsubject-pseudonym%3Atest-111%3Bdate-of-birth%3A2000-01-01%3Bsex%3Amale%3Bdate-of-test%3A2020-01-01%3Brepeated-test%3AFalse%3Bpatient-year-first-symptom%3A%3Bpatient-month-first-symptom%3A%3Bpatient-day-first-symptom%3A%3Bpatient-year-diagnosis%3A%3Bpatient-month-diagnosis%3A%3Bpatient-day-diagnosis%3A%3Bpatient-main-disease%3A%3Bpatient-stronger-impacted-hand%3A%3Blaterality-quotient%3A%3Bmaximum-ftf-left%3A%3Bmaximum-ftf-right%3A%3Bmaximum-gs-left%3A%3Bmaximum-gs-right%3A%3Bpurdue-pegboard-left%3A%3Bpurdue-pegboard-right%3A%3Bturn-cards-left%3A%3Bturn-cards-right%3A%3Bsmall-things-left%3A%3Bsmall-things-right%3A%3Bsimulated-feeding-left%3A%3Bsimulated-feeding-right%3A%3Bcheckers-left%3A%3Bcheckers-right%3A%3Blarge-light-things-left%3A%3Blarge-light-things-right%3A%3Blarge-heavy-things-left%3A%3Blarge-heavy-things-right%3A%3Bjtt-incorrectly-executed%3A%3Barat-left%3A%3Barat-right%3A%3Btug-executed%3A%3Btug-a-incorrectly-executed%3A%3Btug-a-tools-required%3A%3Btug-imagined%3A%3Bgo-nogo-block-count%3A%3Bgo-nogo-total-errors%3A%3Bgo-nogo-wrong-errors%3A%3Bgo-nogo-recognized-errors%3A%3Bgo-nogo-correct-answer-time%3A%3Bgo-nogo-recognized-error-time%3A%3Bgo-nogo-incorrectly-executed%3A%3Bkas-pantomime-bukko-facial%3A%3Bkas-pantomime-arm-hand%3A%3Bkas-imitation-bukko-facial%3A%3Bkas-imitation-arm-hand%3A%3Bkopss-orientation%3A%3Bkopss-speech%3A%3Bkopss-praxie%3A%3Bkopss-visual-spatial-performance%3A%3Bkopss-calculating%3A%3Bkopss-executive-performance%3A%3Bkopss-memory%3A%3Bkopss-affect%3A%3Bkopss-behavior-observation%3A%3Bacl-k-loud-reading%3A%3Bacl-k-color-form-test%3A%3Bacl-k-supermarket-task%3A%3Bacl-k-communication-ability%3A%3Bbdi-ii-score%3A%3Bmadrs-score%3A%3Bdemtect-wordlist%3A%3Bdemtect-convert-numbers%3A%3Bdemtect-supermarket-task%3A%3Bdemtect-numbers-reverse%3A%3Bdemtect-wordlist-recall%3A%3Btime-tmt-a%3A%3Btmt-a-incorrectly-executed%3A%3Btime-tmt-b%3A%3Btmt-b-incorrectly-executed%3A%3Bmrs-score%3A%3Beuroqol-code%3A%3Beuroqol-vas%3A%3Bisced-value%3A%3Badditional-mrt-url%3A%3Badditional-mrt-resting-state%3A%3Badditional-mrt-tapping-task%3A%3Badditional-mrt-anatomical-representation%3A%3Badditional-mrt-dti%3A%3Badditional-eeg-url%3A%3Badditional-blood-sampling-url%3A%3Badditional-remarks%3A&hash-value=3bb998f5acf11ad82a17b3cef2c14258712a3b50c5efe7261e7792158e058ebe&signature-data="""
|
minimal_form_data = """form-data-version=2.3&data-entry-domain=de.sfb1451.z03&data-entry-employee=cm-test&project-code=b2&subject-pseudonym=test-111&date-of-birth=2000-01-01&sex=male&date-of-test=2010-01-02&subject-group=healthy&patient-year-first-symptom=&patient-month-first-symptom=&patient-day-first-symptom=&patient-year-diagnosis=&patient-month-diagnosis=&patient-day-diagnosis=&additional-remarks=&hashed-string=form-data-version%3A2.3%3Bdata-entry-domain%3Ade.sfb1451.z03%3Bdata-entry-employee%3Acm-test%3Bproject-code%3Ab2%3Bsubject-pseudonym%3Atest-111%3Bdate-of-birth%3A2000-01-01%3Bsex%3Amale%3Bdate-of-test%3A2010-01-02%3Brepeated-test%3AFalse%3Bpatient-year-first-symptom%3A%3Bpatient-month-first-symptom%3A%3Bpatient-day-first-symptom%3A%3Bpatient-year-diagnosis%3A%3Bpatient-month-diagnosis%3A%3Bpatient-day-diagnosis%3A%3Bpatient-main-disease%3A%3Bpatient-stronger-impacted-hand%3A%3Blaterality-quotient%3A%3Bmaximum-ftf-left%3A%3Bmaximum-ftf-right%3A%3Bmaximum-gs-left%3A%3Bmaximum-gs-right%3A%3Bpurdue-pegboard-left%3A%3Bpurdue-pegboard-right%3A%3Bturn-cards-left%3A%3Bturn-cards-right%3A%3Bsmall-things-left%3A%3Bsmall-things-right%3A%3Bsimulated-feeding-left%3A%3Bsimulated-feeding-right%3A%3Bcheckers-left%3A%3Bcheckers-right%3A%3Blarge-light-things-left%3A%3Blarge-light-things-right%3A%3Blarge-heavy-things-left%3A%3Blarge-heavy-things-right%3A%3Bjtt-incorrectly-executed%3A%3Barat-left%3A%3Barat-right%3A%3Btug-executed%3A%3Btug-a-incorrectly-executed%3A%3Btug-a-tools-required%3A%3Btug-imagined%3A%3Bgo-nogo-block-count%3A%3Bgo-nogo-total-errors%3A%3Bgo-nogo-wrong-errors%3A%3Bgo-nogo-recognized-errors%3A%3Bgo-nogo-correct-answer-time%3A%3Bgo-nogo-recognized-error-time%3A%3Bgo-nogo-incorrectly-executed%3A%3Bkas-pantomime-bukko-facial%3A%3Bkas-pantomime-arm-hand%3A%3Bkas-imitation-bukko-facial%3A%3Bkas-imitation-arm-hand%3A%3Bkopss-orientation%3A%3Bkopss-speech%3A%3Bkopss-praxie%3A%3Bkopss-visual-spatial-performance%3A%3Bkopss-calculating%3A%3Bkopss-executive-performance%3A%3Bkopss-memory%3A%3Bkopss-affect%3A%3Bkopss-behavior-observation%3A%3Bacl-k-loud-reading%3A%3Bacl-k-color-form-test%3A%3Bacl-k-supermarket-task%3A%3Bacl-k-communication-ability%3A%3Bbdi-ii-score%3A%3Bmadrs-score%3A%3Bdemtect-wordlist%3A%3Bdemtect-convert-numbers%3A%3Bdemtect-supermarket-task%3A%3Bdemtect-numbers-reverse%3A%3Bdemtect-wordlist-recall%3A%3Btime-tmt-a%3A%3Btmt-a-incorrectly-executed%3A%3Btime-tmt-b%3A%3Btmt-b-incorrectly-executed%3A%3Bmrs-score%3A%3Beuroqol-code%3A%3Beuroqol-vas%3A%3Bisced-value%3A%3Bpsqi-sleep-quality%3A%3Bpsqi-sleep-latency%3A%3Bpsqi-sleep-duration%3A%3Bpsqi-sleep-efficiency%3A%3Bpsqi-sleep-disturbance%3A%3Bpsqi-meds%3A%3Bpsqi-day-dysfunction%3A%3Badditional-mrt-url%3A%3Badditional-mrt-resting-state%3A%3Badditional-mrt-tapping-task%3A%3Badditional-mrt-anatomical-representation%3A%3Badditional-mrt-dti%3A%3Badditional-eeg-url%3A%3Badditional-blood-sampling-url%3A%3Badditional-remarks%3A&hash-value=ce79e0bf021bf3770a7747a5328ab59aab7edb26f5d90dd168c39cf0c59d548c&signature-data="""
|
||||||
|
#"""form-data-version=2.2&data-entry-domain=de.sfb1451.z03&data-entry-employee=cm-test&project-code=b4&subject-pseudonym=test-111&date-of-birth=2000-01-01&sex=male&date-of-test=2020-01-01&subject-group=healthy&patient-year-first-symptom=&patient-month-first-symptom=&patient-day-first-symptom=&patient-year-diagnosis=&patient-month-diagnosis=&patient-day-diagnosis=&additional-remarks=&hashed-string=form-data-version%3A2.2%3Bdata-entry-domain%3Ade.sfb1451.z03%3Bdata-entry-employee%3Acm-test%3Bproject-code%3Ab4%3Bsubject-pseudonym%3Atest-111%3Bdate-of-birth%3A2000-01-01%3Bsex%3Amale%3Bdate-of-test%3A2020-01-01%3Brepeated-test%3AFalse%3Bpatient-year-first-symptom%3A%3Bpatient-month-first-symptom%3A%3Bpatient-day-first-symptom%3A%3Bpatient-year-diagnosis%3A%3Bpatient-month-diagnosis%3A%3Bpatient-day-diagnosis%3A%3Bpatient-main-disease%3A%3Bpatient-stronger-impacted-hand%3A%3Blaterality-quotient%3A%3Bmaximum-ftf-left%3A%3Bmaximum-ftf-right%3A%3Bmaximum-gs-left%3A%3Bmaximum-gs-right%3A%3Bpurdue-pegboard-left%3A%3Bpurdue-pegboard-right%3A%3Bturn-cards-left%3A%3Bturn-cards-right%3A%3Bsmall-things-left%3A%3Bsmall-things-right%3A%3Bsimulated-feeding-left%3A%3Bsimulated-feeding-right%3A%3Bcheckers-left%3A%3Bcheckers-right%3A%3Blarge-light-things-left%3A%3Blarge-light-things-right%3A%3Blarge-heavy-things-left%3A%3Blarge-heavy-things-right%3A%3Bjtt-incorrectly-executed%3A%3Barat-left%3A%3Barat-right%3A%3Btug-executed%3A%3Btug-a-incorrectly-executed%3A%3Btug-a-tools-required%3A%3Btug-imagined%3A%3Bgo-nogo-block-count%3A%3Bgo-nogo-total-errors%3A%3Bgo-nogo-wrong-errors%3A%3Bgo-nogo-recognized-errors%3A%3Bgo-nogo-correct-answer-time%3A%3Bgo-nogo-recognized-error-time%3A%3Bgo-nogo-incorrectly-executed%3A%3Bkas-pantomime-bukko-facial%3A%3Bkas-pantomime-arm-hand%3A%3Bkas-imitation-bukko-facial%3A%3Bkas-imitation-arm-hand%3A%3Bkopss-orientation%3A%3Bkopss-speech%3A%3Bkopss-praxie%3A%3Bkopss-visual-spatial-performance%3A%3Bkopss-calculating%3A%3Bkopss-executive-performance%3A%3Bkopss-memory%3A%3Bkopss-affect%3A%3Bkopss-behavior-observation%3A%3Bacl-k-loud-reading%3A%3Bacl-k-color-form-test%3A%3Bacl-k-supermarket-task%3A%3Bacl-k-communication-ability%3A%3Bbdi-ii-score%3A%3Bmadrs-score%3A%3Bdemtect-wordlist%3A%3Bdemtect-convert-numbers%3A%3Bdemtect-supermarket-task%3A%3Bdemtect-numbers-reverse%3A%3Bdemtect-wordlist-recall%3A%3Btime-tmt-a%3A%3Btmt-a-incorrectly-executed%3A%3Btime-tmt-b%3A%3Btmt-b-incorrectly-executed%3A%3Bmrs-score%3A%3Beuroqol-code%3A%3Beuroqol-vas%3A%3Bisced-value%3A%3Badditional-mrt-url%3A%3Badditional-mrt-resting-state%3A%3Badditional-mrt-tapping-task%3A%3Badditional-mrt-anatomical-representation%3A%3Badditional-mrt-dti%3A%3Badditional-eeg-url%3A%3Badditional-blood-sampling-url%3A%3Badditional-remarks%3A&hash-value=3bb998f5acf11ad82a17b3cef2c14258712a3b50c5efe7261e7792158e058ebe&signature-data="""
|
||||||
|
|
||||||
|
form_data_version = minimal_form_data.split("&")[0].split("=")[1]
|
||||||
|
|
||||||
|
|
||||||
class TestStoreData(unittest.TestCase):
|
class TestStoreData(unittest.TestCase):
|
||||||
|
|
@ -93,7 +96,7 @@ class TestStoreData(unittest.TestCase):
|
||||||
"REMOTE_ADDR": "1.2.3.4"
|
"REMOTE_ADDR": "1.2.3.4"
|
||||||
})
|
})
|
||||||
|
|
||||||
expected_path = Path(temp_dir) / "input/2.2/0.0.json"
|
expected_path = Path(temp_dir) / f"input/{form_data_version}/0.0.json"
|
||||||
with expected_path.open() as f:
|
with expected_path.open() as f:
|
||||||
json_object = json.load(f)
|
json_object = json.load(f)
|
||||||
print(json_object)
|
print(json_object)
|
||||||
|
|
@ -130,10 +133,10 @@ class TestStoreData(unittest.TestCase):
|
||||||
"REMOTE_ADDR": "1.2.3.4"
|
"REMOTE_ADDR": "1.2.3.4"
|
||||||
})
|
})
|
||||||
|
|
||||||
expected_path = dataset_path / "input/2.2/0.0.json"
|
expected_path = dataset_path / f"input/{form_data_version}/0.0.json"
|
||||||
with expected_path.open() as f:
|
with expected_path.open() as f:
|
||||||
json_object_1 = json.load(f)
|
json_object_1 = json.load(f)
|
||||||
expected_sibling_path = sibling_path / "input/2.2/0.0.json"
|
expected_sibling_path = sibling_path / f"input/{form_data_version}/0.0.json"
|
||||||
with expected_sibling_path.open() as f:
|
with expected_sibling_path.open() as f:
|
||||||
json_object_2 = json.load(f)
|
json_object_2 = json.load(f)
|
||||||
assert json_object_1 == json_object_2
|
assert json_object_1 == json_object_2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue