-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#73 Added Patient questions, answers, patient list, updated api, doct…
…or feed, and login form to fix some race conditions
- Loading branch information
Showing
18 changed files
with
408 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
core/src/main/resources/vue/components/medical-profile.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<template id="medical-profile"> | ||
<div this="el" class="col-lg-3 p-0 border-right"> | ||
<div class="d-flex row mt-4 pl-5"> | ||
<img alt="patient-profile-img" class="profile-img" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Circle-icons-profile.svg/768px-Circle-icons-profile.svg.png" ></img> | ||
<div class="ml-2"> | ||
<h5 this="name" class="mb-0"></h5> | ||
<h6 this="age" class="text-secondary"></h6> | ||
</div> | ||
</div> | ||
<h5 class="bg-blue-primary text-white d-block mx-auto p-2 mt-3"> | ||
General Info | ||
</h5> | ||
<div class="row text-center p-3"> | ||
<div class="col-4"> | ||
<h6>Sex</h6> | ||
<h4 this="sex" class="text-info"> | ||
</h4> | ||
</div> | ||
<div class="col-4"> | ||
<h6>Height</h6> | ||
<div class="d-inline-flex text-info"> | ||
<h4 this="height"></h4> | ||
<p class="ml-1">cm</p> | ||
</div> | ||
</div> | ||
<div class="col-4"> | ||
<h6>Weight</h6> | ||
<div class="d-inline-flex text-info"> | ||
<h4 this="weight"></h4> | ||
<p class="ml-1">kg</p> | ||
</div> | ||
</div> | ||
</div> | ||
<h5 class="bg-blue-primary text-white d-block mx-auto p-2 mt-3"> | ||
Medical Flags | ||
</h5> | ||
<div class="col-12 py-1"> | ||
<input disabled="disabled" type="checkbox" id="G6PD" this="g6pdDeficiency" name="G6PD" value="G6PD Deficiency" ></input> | ||
<label class="ml-1" for="G6PD"> | ||
G6PD Deficiency | ||
</label> | ||
<br></br> | ||
<input disabled="disabled" type="checkbox" id="respiratory" name="respiratory" value="Respiratory Diseases" this="respiratoryDiseases"></input> | ||
<label class="ml-1" for="respiratory"> | ||
Respiratory Diseases | ||
</label> | ||
<br ></br> | ||
<input disabled="disabled" type="checkbox" id="diabetes" name="diabetes" value="Diabetes" this="diabetes"></input> | ||
<label class="ml-1" for="diabetes"> | ||
Diabetes | ||
</label> | ||
<br ></br> | ||
<input disabled="disabled" type="checkbox" id="cardio" name="cardio" value="Cardiovascular Diseases" this="cardiovascularDiseases"></input> | ||
<label class="ml-1" for="cardio"> | ||
Cardiovascular Diseases | ||
</label> | ||
<br ></br> | ||
<input disabled="disabled" type="checkbox" id="obesity" name="obesity" value="Obesity" this="obesity"></input> | ||
<label class="ml-1" for="obesity"> | ||
Obesity | ||
</label> | ||
<br></br> | ||
</div> | ||
<h5 class="bg-blue-primary text-white d-block mx-auto p-2 mt-3"> | ||
Current Medications | ||
</h5> | ||
<div class="p-1"> | ||
{this.medications = list('ul', Medication)} | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
Vue.component("medical-profile", { | ||
template: "#medical-profile", | ||
props: ["patientId"], | ||
data: () => ({ | ||
medications: [], | ||
medicalData: {}, | ||
personaldata: {} | ||
}), | ||
created() { | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template id="patient-answer"> | ||
<div class="row"> | ||
<div class="answer-card card card-common rounded-lg w-100"> | ||
<div class="card-header d-flex justify-content-start"> | ||
<h6>{{answer.question.question}}</h6> | ||
</div> | ||
<div class="card-body w-100"> | ||
<div class="answer-note">{{answer.answer}}</div> | ||
<p> | ||
<div class="d-flex justify-content-between w-100"> | ||
<div> | ||
<div>{{answer.creationDate}}</div> | ||
<div class="d-flex"> | ||
<i class="fa fa-clock"></i> | ||
<div>{{answer.creationDate}}</div> | ||
</div> | ||
</div> | ||
<div> | ||
<button v-on:click="dismiss" class="btn btn-danger">Dismiss</button> | ||
</div> | ||
</div> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
Vue.component("patient-answer", { | ||
template: "patient-answer", | ||
props: ["answer"], | ||
methods: { | ||
dismiss: function () { | ||
window.apiService.archiveAnswer(this.answer.patientId, this.answer.id).then((res) => { | ||
this.$emit("dismiss"); | ||
}); | ||
} | ||
} | ||
}) | ||
</script> |
43 changes: 43 additions & 0 deletions
43
core/src/main/resources/vue/components/patient-answers.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template id="patient-answers"> | ||
<div class="col-lg-6"> | ||
<div class="bg-light-grey mx-2 my-4 "> | ||
<div class="col-12 d-flex justify-content-between"> | ||
<h5 class="py-3 text-info font-weight-bold">Patient Answers</h5> | ||
<div class="py-2"> | ||
<a v-bind:href="askLink" class="btn btn-primary">Questions</a> | ||
</div> | ||
</div> | ||
<div class="col-12"> | ||
<div v-if="answers && answers.length>0" class="container-fluid"> | ||
<template v-for="(answer, index) in answers" :key="index"> | ||
<patient-answer v-bind:answer="answer" v-on:dismiss="dismiss(index)" ></patient-answer> | ||
</template> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
Vue.component('patient-answers', { | ||
template: "#patient-answers", | ||
props: ["patientId"], | ||
data: () => ({ | ||
answers: [] | ||
}), | ||
computed: { | ||
askLink: function () { | ||
return"/patient/" + this.patientId + "/ask" | ||
} | ||
}, | ||
methods: { | ||
dismiss: function (index) { | ||
this.answers.splice(index, 1); | ||
} | ||
}, | ||
created() { | ||
window.apiService.getPatientAnswers(this.patientId).then((data) => { | ||
this.answers = data; | ||
}); | ||
} | ||
}) | ||
</script> |
Oops, something went wrong.