This commit is contained in:
Olu Amey
2020-12-07 13:37:35 -05:00
parent fffcc586e2
commit ad9a72789c
4 changed files with 49 additions and 10 deletions
+6 -6
View File
@@ -1,9 +1,9 @@
<ion-content fullscreen>
<ion-grid>
<ion-grid style="scroll-padding-bottom: 0px;">
<ion-row>
<ion-col>
<div>
<h4>{{ welcomeName }}</h4>
<h4 style="font-weight: bold;">{{ welcomeName }}</h4>
</div>
</ion-col>
<ion-col>
@@ -29,7 +29,7 @@
<ion-list>
<ion-list-header>
Pending Consults
<h3 style="font-weight: bold;">Pending Consult(s)</h3>
</ion-list-header>
<ion-item *ngFor="let type of pendingEncounterData" (click)="goPatient(type)">
@@ -37,9 +37,9 @@
<img src="./../../assets/imgs/avatar.svg">
</ion-avatar>
<ion-label>
<h2>{{type.firstname}} {{type.lastname}}</h2>
<h2 style="font-weight: bold;color: #8e54e9;">{{type.appt}} {{type.gender}} , {{type.age}} yrs</h2>
<h3>{{type.firstname}} {{type.lastname}}</h3>
<h3>{{type.reason}}</h3>
<p>{{type.appt}} {{type.gender}} , {{type.age}} yrs</p>
</ion-label>
</ion-item>
@@ -48,7 +48,7 @@
<ion-list>
<ion-list-header>
Recent Consults
<h3 style="font-weight: bold;">Recent Consult(s)</h3>
</ion-list-header>
<ion-item *ngFor="let type of cardData" (click)="goPatient(type)">
@@ -51,7 +51,12 @@ export class MermsMypatientsPage implements OnInit {
}
goSelectPatient(patientData: any) {
this.router.navigateByUrl('/merms-selectedpatient');
let navigationExtras: NavigationExtras = {
queryParams: {
special: JSON.stringify(patientData)
}
};
this.router.navigateByUrl('/merms-selectedpatient',navigationExtras);
}
goAddPatient() {
@@ -6,7 +6,7 @@
<ion-col size="2" class="navigation">
<ion-back-button text="" (click)="goBack()"></ion-back-button>
</ion-col>
<ion-col size="8" class="page-title">Paient Name Here</ion-col>
<ion-col size="8" class="page-title">{{patient_name}}</ion-col>
</ion-row>
</ion-grid>
@@ -1,4 +1,10 @@
import { Component, OnInit } from '@angular/core';
import { Router, NavigationExtras, ActivatedRoute } from '@angular/router'
import {
NavController,
AlertController,
LoadingController,
} from '@ionic/angular'
@Component({
selector: 'app-merms-selectedpatient',
@@ -7,11 +13,39 @@ import { Component, OnInit } from '@angular/core';
})
export class MermsSelectedpatientPage implements OnInit {
constructor() { }
patient_name: string = "Selected Patient";
patientData: any;
reason: string;
patient_id : number = 0;
lastname : string ='';
firstname : string ='';
appt : string ='';
gender : string ='';
age : number =0;
constructor(public navCtrl: NavController, private router: Router, private route: ActivatedRoute) {
console.log('-----------------------------xxxx-----------------------------');
console.log(this.router.getCurrentNavigation().extras.queryParams);
this.patientData = this.router.getCurrentNavigation().extras.queryParams;
console.log(this.patientData.special);
var params = JSON.parse(this.patientData.special);
this.patient_name = params.firstname + ' ' + params.lastname;
this.reason = params.reason;
this.age = params.age;
this.gender = params.gender;
this.appt = params.appt;
this.patient_id = params.id;
this.firstname = params.firstname;
}
ngOnInit() {
}
goBack(){
}
}