Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

medications feature #98

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/editProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
postObj['check_irb_url'] = "<?php echo $module->getUrl("services/checkIRB.php"); ?>";
// store URL for services/callMetadata.php
postObj['metadata_url'] = "<?php echo $module->getUrl("services/callMetadata.php"); ?>";
// store URL for services/getLabResults.php
postObj['get_lab_results_url'] = "<?php echo $module->getUrl("services/getLabResults.php"); ?>";
// store URL for services/getCache.php
postObj['get_cache_url'] = "<?php echo $module->getUrl("services/getCache.php"); ?>";
// store URL for services/getDatasetDesigns.php
postObj['get_dataset_designs_url'] = "<?php echo $module->getUrl("services/getDatasetDesigns.php"); ?>";
// store URL for services/refreshSession.php
Expand Down
2,027 changes: 2,027 additions & 0 deletions pages/js/duster/new-project/dist/assets/index-2a279c94.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pages/js/duster/new-project/dist/assets/index-4cd59041.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pages/js/duster/new-project/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!-- <link rel="icon" href="../shared/src/assets/images/favicon.ico"> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DUSTER</title>
<script type="module" crossorigin src="./assets/index-1d978ef1.js"></script>
<link rel="stylesheet" href="./assets/index-4f7a9f65.css">
<script type="module" crossorigin src="./assets/index-2a279c94.js"></script>
<link rel="stylesheet" href="./assets/index-4cd59041.css">
</head>
<body>
<div id="app"></div>
Expand Down
18 changes: 14 additions & 4 deletions pages/js/duster/new-project/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ import DemographicsPanel from '@/components/DemographicsPanel.vue';
import CollectionWindowsPanel from '@/components/CollectionWindowsPanel.vue';
import ReviewPanel from '@/components/ReviewPanel.vue';


// for testing
import resp from './dusterTestMetadata.json';
import labResultsDev from './lab_results.json'; // TODO delete this line
Expand Down Expand Up @@ -226,10 +227,17 @@ const clinicalDateOptions = ref<FieldMetadata[]>([]);

const labResults = ref();
const labResultsMetadata = computed<any>(() => {
return labResults.value.results;
// return labResults.value.results;
return labResults.value;
});
provide('labResults', labResultsMetadata);

const medicationsCache = ref();
const medicationsMetadata = computed<any>(() => {
return medicationsCache.value;
});
provide('medicationsMetadata', medicationsMetadata);

const metadataArr = computed<Array<FieldMetadata>>(() => {
let arr:FieldMetadata[] = [];
return arr.concat(demographicsOptions.value)
Expand Down Expand Up @@ -478,10 +486,12 @@ const getDusterMetadata = (metadataUrl:string) => {
outcomeOptions.value = response.data.outcomes;
scoreOptions.value = response.data.scores;
clinicalDateOptions.value = response.data.clinical_dates;
// get lab results metadata
axios.get(projectConfig.get_lab_results_url)

// get STARR cache
axios.get(projectConfig.get_cache_url)
.then(function (response) {
labResults.value = response.data;
labResults.value = response.data.labs;
medicationsCache.value = response.data.medications;
irbCheckVisible.value = false;

// fetch dataset designs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@
v-model:selected-options="localClinicalData.vitals"
/>
</AccordionTab>
<!-- Medications
<AccordionTab header="Medications">
<Medications />
<MedicationsOptions
:initialMedications="(initialData as any).medications ? (initialData as any).medications : []"
v-model="localClinicalData.medications"
/>
</AccordionTab>
-->
<AccordionTab header="Outcomes">
<ClinicalDataOptions
category="outcomes"
Expand Down Expand Up @@ -268,7 +269,7 @@ import Toast from 'primevue/toast';
import {INIT_TIMING_CONFIG} from "@/types/TimingConfig";
import {helpers, requiredIf, minLength} from "@vuelidate/validators";
import {useVuelidate} from "@vuelidate/core";
import Medications from "@/components/Medications.vue";
import MedicationsOptions from "@/components/MedicationsOptions.vue";

const props = defineProps({
showClinicalDataDialog: Boolean,
Expand Down Expand Up @@ -760,10 +761,8 @@ const activeClinicalOptions = computed({
})

const expandAll = () => {
activeClinicalOptions.value = [0,1,2,3,4];
//activeClinicalOptions.value = [0,1,2,3,4,5];
activeClinicalOptions.value = [0,1,2,3,4,5];
}
/****/

</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,16 @@
Vitals
<Badge class="p-badge-no-gutter">{{ slotProps.data[slotProps.field].vitals.length }}</Badge>
</Button>
<!-- TODO Medications
<Button @click="showClinicalData('medications', slotProps.data)" size="small" class="ml-1 p-1 pr-2 pl-2" rounded :severity="(v$.$dirty && !slotProps.data[slotProps.field].valid) ? 'danger':'primary'">
Medications<Badge class="p-badge-no-gutter">{{ slotProps.data[slotProps.field].vitals.length }}</Badge>
<Button
@click="showClinicalData('medications', slotProps.data)"
size="small"
class="ml-1 p-1 pr-2 pl-2"
rounded
>
Medications
<Badge class="p-badge-no-gutter">{{ slotProps.data[slotProps.field].medications?.length }}</Badge>
</Button>
-->

<Button @click="showClinicalData('outcomes', slotProps.data)" size="small" class="ml-1 p-1 pr-2 pl-2" rounded>
Outcomes<Badge class="p-badge-no-gutter">{{ slotProps.data[slotProps.field].outcomes.length }}</Badge>
</Button>
Expand Down Expand Up @@ -371,30 +376,14 @@ const showClinicalData = (category:string, cw: CollectionWindow) => {
case 'vitals' :
activeClinicalOptions.value.push(2);
break;
case 'outcomes' :
activeClinicalOptions.value.push(3);
break;
case 'scores' :
activeClinicalOptions.value.push(4);
/* TODO Medications
case 'labs' :
activeClinicalOptions.value.push(0);
break;
case 'ud_labs':
activeClinicalOptions.value.push(1);
break;
case 'vitals' :
activeClinicalOptions.value.push(2);
break;
case 'medications' :
case 'medications':
activeClinicalOptions.value.push(3);
break;
case 'outcomes' :
activeClinicalOptions.value.push(4);
break;
case 'scores' :
activeClinicalOptions.value.push(5);
*/
}
showClinicalDataDialog.value = true
}
Expand Down
190 changes: 0 additions & 190 deletions pages/js/duster/new-project/src/components/Medications.vue

This file was deleted.

Loading
Loading