Skip to content

Commit

Permalink
Merge pull request #100 from susom/dev
Browse files Browse the repository at this point in the history
medications feature production release
  • Loading branch information
sboosi authored Jan 2, 2025
2 parents e315bf3 + 9db148b commit 61105ae
Show file tree
Hide file tree
Showing 18 changed files with 2,686 additions and 2,384 deletions.
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-04e9109a.js

Large diffs are not rendered by default.

2,027 changes: 0 additions & 2,027 deletions pages/js/duster/new-project/dist/assets/index-1d978ef1.js

This file was deleted.

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-04e9109a.js"></script>
<link rel="stylesheet" href="./assets/index-6f9e8958.css">
</head>
<body>
<div id="app"></div>
Expand Down
21 changes: 16 additions & 5 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 Expand Up @@ -514,9 +524,10 @@ const getDusterMetadata = (metadataUrl:string) => {
const loadEditMode = () => {
// add an empty array for missing user-defined labs to each data collection window
// retroactive support for user-defined labs feature for older projects
// retroactive support for user-defined labs and medications features for older projects
projectConfig.initial_design.collectionWindows.forEach((cw: any) => {
cw.data.ud_labs = cw.data.ud_labs ? cw.data.ud_labs : [];
cw.data.medications = cw.data.medications ? cw.data.medications : [];
});
initialDesign.value = projectConfig.initial_design;
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

0 comments on commit 61105ae

Please sign in to comment.