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

Group 15 Assignment #530

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
89fbb81
i added the console log in the pipe to verify that the data is being …
FeruzyNtillah Jan 17, 2025
378bc4c
I added the codeline to extract the notes associated with a patient's…
FeruzyNtillah Jan 17, 2025
1134442
added logic to handle the extraction and presentation of visit notes …
msogoya01 Jan 17, 2025
ba98ec6
Merge branch 'main' of https://github.com/FeruzyNtillah/iCareConnect
msogoya01 Jan 17, 2025
5433aab
This code is responsible for extracting and ensuring the availability…
AlmachiusBenedicto Jan 17, 2025
dd18304
Merge branch 'main' of https://github.com/FeruzyNtillah/iCareConnect
AlmachiusBenedicto Jan 17, 2025
a1321f9
Fetch and inclusion service Records as part of the return structure …
msogoya01 Jan 17, 2025
8755f12
Fetch and inclusion service Records as part of the return structure …
msogoya01 Jan 17, 2025
96a093c
i have added a visit notes section.Ensure that each visit object in t…
FeruzyNtillah Jan 17, 2025
57f4996
Merge branch 'main' of https://github.com/FeruzyNtillah/iCareConnect
FeruzyNtillah Jan 17, 2025
34dc7d9
Add service records to clinical summary display
msogoya01 Jan 17, 2025
0f1101e
Merge branch 'main' of https://github.com/FeruzyNtillah/iCareConnect
msogoya01 Jan 17, 2025
e5b4985
Display visit note
RigobertFrancis Jan 17, 2025
189e775
Processing Data
RigobertFrancis Jan 17, 2025
206014a
Processing observation
RigobertFrancis Jan 17, 2025
f45f278
Check Diagnoses Rendering
RigobertFrancis Jan 17, 2025
4af0166
I added service records as input field in input button and element to…
AlmachiusBenedicto Jan 17, 2025
92548e2
Merge branch 'main' of https://github.com/FeruzyNtillah/iCareConnect
AlmachiusBenedicto Jan 17, 2025
c8f3844
on the on print function the arguments passed are declared and never …
mellcky Jan 17, 2025
3971c95
service record was not readable
mellcky Jan 17, 2025
7df5ddd
work closely to print button component in typescript file
mellcky Jan 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,21 @@ export class PatientClinicalNotesSummaryComponent implements OnInit {
constructor(private store: Store<AppState>) {}

ngOnInit(): void {
this.observations$ = !this.forHistory
? this.store.pipe(select(getGroupedObservationByConcept))
: of(groupObservationByConcept(this.patientVisit?.observations));
if (!this.forHistory) {
this.observations$ = this.store.pipe(select(getGroupedObservationByConcept));
} else {
const groupedObservations = groupObservationByConcept(
this.patientVisit?.observations
);
const notes = this.patientVisit?.visit?.notes || ["No notes available"];
const services = this.patientVisit?.visit?.services || ["No services available"];

this.observations$ = of({
...groupedObservations,
visitNotes: notes,
serviceRecords: services,
});
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,16 @@ export class PatientHistoryDataComponent implements OnInit {
);
}

<<<<<<< HEAD
onPrint(e: any, visitData: any): void {
e.preventDefault();
visitData.preventDefault();

=======
onPrint(e: Event, visitData: any): void {
e.preventDefault()
visitData.preventDefault()
>>>>>>> 5002630e4 (implement a logic to utilize the arguments onprint function)
// console.log("Patient visit", this.visit);
// console.log("Patient History", this.visitHistory);
let contents: string;
Expand Down Expand Up @@ -609,6 +618,7 @@ ${this.visitHistory?.visitStopDateTime?.date} at ${this.visitHistory?.visitStopD

frameDoc.document.write(`</tbody></table>`);


// -------------------Procedure orders-------------
if (
this.visitHistory?.visitOrderedData?.find(
Expand All @@ -630,8 +640,12 @@ ${this.visitHistory?.visitStopDateTime?.date} at ${this.visitHistory?.visitStopD
</thead>
<tbody>`);
}
this.visitHistory?.visitOrderedData?.forEach((visitData) => {
if (visitData?.category === "PROCEDURE_ORDER") {

// Visit note.....


this.visitHistory?.visitOrderedData?.forEach((visitData) => {
if (visitData?.category === "OBSERVATIONS") {
frameDoc.document.write(`
<tr><td>
${visitData?.concept?.display}
Expand Down Expand Up @@ -668,6 +682,48 @@ ${this.visitHistory?.visitStopDateTime?.date} at ${this.visitHistory?.visitStopD
: "-"
}
</td>
</tr>`);
}
});

//end of visit note

this.visitHistory?.visitOrderedData?.forEach((visitData) => {
if (visitData?.category === "PROCEDURE_ORDER") {
frameDoc.document.write(`
<tr><td>
${visitData?.concept?.display}
</td>
<td> ${visitData?.provider} on
${visitData?.date} ${visitData?.time}
</td> <td>
`);
//................Handle Empty or Undefined Data...............

if (visitData?.results?.length > 0) {
visitData.results.forEach((result) => {
if (!result?.value?.links?.uri) {
frameDoc.document.write(` ${result?.concept?.display || 'N/A'} -
${result?.value?.display || result?.value || 'N/A'}, &nbsp;&nbsp;`);
}
});
} else {
frameDoc.document.write(` Not Attended `);
}

//....................End of Handling Data..................
frameDoc.document.write(`</td>`);
frameDoc.document.write(`
<td>${
visitData?.results[0]?.provider?.display?.split("-")[1]
? visitData?.results[0]?.provider?.display?.split("-")[1] + "on"
: "-"
} ${
visitData?.results[0]?.obsDatetime
? formatDateToString(new Date(visitData?.results[0]?.obsDatetime))
: "-"
}
</td>
</tr>`);
}
});
Expand All @@ -694,15 +750,21 @@ ${this.visitHistory?.visitStopDateTime?.date} at ${this.visitHistory?.visitStopD
</thead>
<tbody>`);

visitData?.obs?.forEach((ob) => {
frameDoc.document.write(`<tr><td> ${ob?.concept?.display} </td><td>
${ob?.value?.display ? ob?.value?.display : ob?.value}
</td></tr>`);
// .............Snippet to process observation..............
if (visitData?.obs?.length > 0) {
visitData.obs.forEach((ob) => {
frameDoc.document.write(`<tr><td>${ob?.concept?.display || 'N/A'}</td><td>
${ob?.value?.display || ob?.value || 'N/A'}
</td></tr>`);
});
} else {
frameDoc.document.write(`<tr><td colspan="2">No Observations Found</td></tr>`);
}
});
}

frameDoc.document.write(`</tbody></table>`);
}
});
}
// this.visitHistory?.visitOrderedData?.forEach((visitData) => {
// if (visitData?.category === "OBSERVATIONS") {
// frameDoc.document.write(`<tr`);
Expand All @@ -716,8 +778,9 @@ ${this.visitHistory?.visitStopDateTime?.date} at ${this.visitHistory?.visitStopD
// }
// });

frameDoc.document.write(`</tbody></table>`);
if (this.visitHistory?.diagnoses?.PROVISIONAL?.length) {
//......Checking both provisional & confirmed are rendered.............

if (Array.isArray(this.visitHistory?.diagnoses?.PROVISIONAL) && this.visitHistory?.diagnoses?.PROVISIONAL.length) {
frameDoc.document.write(`<div>
<h4>Provisional Diagnoses</h4>
`);
Expand All @@ -738,6 +801,8 @@ ${this.visitHistory?.visitStopDateTime?.date} at ${this.visitHistory?.visitStopD
});
}

// ......End of Rendering.............

frameDoc.document.write(`
<div class="footer">
<div class="userDetails">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
provider: provider$ | async
} as params"
>
<!-- Loading Indicator -->
<div *ngIf="!params?.visits?.length && loadingData || !params?.provider">
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>

<!-- Visits Display -->
<div *ngIf="params?.visits?.length && !loadingData && params?.provider">
<mat-vertical-stepper [linear]="false" #stepper>
<mat-step *ngFor="let visit of params?.visits">
Expand All @@ -26,20 +29,22 @@
to {{ visit?.visit?.stopDatetime | date: "dd-MM-yyyy HH:mm:ss" }}
</span>
<span *ngIf="!visit?.visit?.stopDatetime">
<i>(On going visit)</i>
<i>(On-going visit)</i>
</span>
</ng-template>

<!-- <div *ngFor="let form of params?.customForms">

<div>{{ form.name }}</div>

</div> -->
<!-- Visit Notes Section -->
<div class="visit-notes">
<strong>Visit Notes:</strong>
<p>{{ visit?.notes || "No notes available" }}</p>
</div>
<!-- End of Visit Notes Section -->

<!-- Patient History Data -->
<app-patient-history-data
[visit]="visit"
[forms]="params?.customForms"
[FacilityDetails]="params?.facilityDetails"
[facilityDetails]="params?.facilityDetails"
[currentUser]="params?.currentUser"
[generalPrescriptionOrderType]="params?.generalPrescriptionOrderType"
[prescriptionArrangementFields]="
Expand All @@ -49,48 +54,29 @@
[specificDrugConceptUuid]="params?.specificDrugConceptUuid"
></app-patient-history-data>



<!-- Capture Form Data -->
<app-capture-form-data
*ngIf="params?.doctorsIPDRoundForm"
[form]="params?.doctorsIPDRoundForm"
[isLIS]="false"
[formValidationRules]=""
[formValidationRules]="null"
(formDataUpdate)="onDoctorsIPDRoundCommentsFormUpdate($event)"
></app-capture-form-data>


<!-- Saved Form Data (Optional Display) -->
<ng-container *ngIf="savedFormData">
<p>Saved Form Data: {{ savedFormData | json }}</p>
</ng-container>

<div class="mt-2 w-100 d-flex justify-content-end">
<!-- <button
mat-flat-button
color="primary"
(click)="onSave($event, params?.doctorsIPDRoundForm,params?.provider, visit)"
>
Save
</button> -->
<!-- Optional Save Button -->
</div>


</mat-step>
</mat-vertical-stepper>
<!-- <div class="history overflow-auto">
<ng-container *ngFor="let visit of params?.visits">
<app-patient-history-data

[visit]="visit"
[forms]="params?.customForms"
[generalPrescriptionOrderType]="params?.generalPrescriptionOrderType"
[prescriptionArrangementFields]="params?.prescriptionArrangementFields"
[specificDrugConceptUuid]="params?.specificDrugConceptUuid"
></app-patient-history-data>
</ng-container>
</div> -->
</div>
<div *ngIf="!params?.visits?.length && !loadingData">

<!-- No Visits Found Message -->
<div *ngIf="(!params?.visits?.length )&& !loadingData">
<h4 class="text-center">
{{
patient?.person
Expand Down
Loading