Merge branch 'master' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into mohammad
Conflicts: lib/routes.dart lib/screens/patients/patients_screen.dartmerge-requests/32/head
commit
84ebdb98ea
@ -0,0 +1,31 @@
|
||||
|
||||
/*
|
||||
*@author: Amjad Amireh
|
||||
*@Date:27/4/2020
|
||||
*@param:
|
||||
*@return:pass a List<dynamic> to a List<MyModel> from a JSON
|
||||
|
||||
*@desc:
|
||||
*/
|
||||
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
|
||||
class TopTenUsersModelResponse {
|
||||
final List<PatiantInformtion> list;
|
||||
String firstName;
|
||||
TopTenUsersModelResponse({
|
||||
this.list,
|
||||
this.firstName,
|
||||
});
|
||||
|
||||
factory TopTenUsersModelResponse.fromJson(List<dynamic> parsedJson) {
|
||||
|
||||
// List<PatientModel> list = new List<PatientModel>();
|
||||
List<PatiantInformtion> list = new List<PatiantInformtion>();
|
||||
//PatiantInformtion
|
||||
list = parsedJson.map((i) => PatiantInformtion.fromJson(i)).toList();
|
||||
|
||||
return new TopTenUsersModelResponse(list: list);
|
||||
}
|
||||
}
|
||||
|
||||
class PatiantInformtionl {
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
import 'dart:convert';
|
||||
|
||||
//PatiantInformtion patiantInformtionFromJson(String str) => PatiantInformtion.fromJson(json.decode(str));
|
||||
|
||||
////String patiantInformtionToJson(PatiantInformtion data) => json.encode(data.toJson());
|
||||
//****************************** */
|
||||
|
||||
/*
|
||||
*@author: Amjad Amireh
|
||||
*@Date:27/4/2020
|
||||
*@param:
|
||||
*@return:Patian information Model
|
||||
|
||||
*@desc:
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class PatiantInformtion {
|
||||
final List<PatiantInformtion> list;
|
||||
int projectId;
|
||||
int clinicId;
|
||||
int doctorId;
|
||||
int patientId;
|
||||
String doctorName;
|
||||
String doctorNameN;
|
||||
String firstName;
|
||||
String middleName;
|
||||
String lastName;
|
||||
String firstNameN;
|
||||
String middleNameN;
|
||||
String lastNameN;
|
||||
int gender;
|
||||
String dateofBirth;
|
||||
String nationalityId;
|
||||
String mobileNumber;
|
||||
String emailAddress;
|
||||
String patientIdentificationNo;
|
||||
int patientType;
|
||||
String admissionNo;
|
||||
String admissionDate;
|
||||
String roomId;
|
||||
String bedId;
|
||||
String nursingStationId;
|
||||
String description;
|
||||
String clinicDescription;
|
||||
String clinicDescriptionN;
|
||||
String nationalityName;
|
||||
String nationalityNameN;
|
||||
String age;
|
||||
String genderDescription;
|
||||
String nursingStationName;
|
||||
|
||||
PatiantInformtion({
|
||||
this.list,
|
||||
this.projectId,
|
||||
this.clinicId,
|
||||
this.doctorId,
|
||||
this.patientId,
|
||||
this.doctorName,
|
||||
this.doctorNameN,
|
||||
this.firstName,
|
||||
this.middleName,
|
||||
this.lastName,
|
||||
this.firstNameN,
|
||||
this.middleNameN,
|
||||
this.lastNameN,
|
||||
this.gender,
|
||||
this.dateofBirth,
|
||||
this.nationalityId,
|
||||
this.mobileNumber,
|
||||
this.emailAddress,
|
||||
this.patientIdentificationNo,
|
||||
this.patientType,
|
||||
this.admissionNo,
|
||||
this.admissionDate,
|
||||
this.roomId,
|
||||
this.bedId,
|
||||
this.nursingStationId,
|
||||
this.description,
|
||||
this.clinicDescription,
|
||||
this.clinicDescriptionN,
|
||||
this.nationalityName,
|
||||
this.nationalityNameN,
|
||||
this.age,
|
||||
this.genderDescription,
|
||||
this.nursingStationName,
|
||||
});
|
||||
|
||||
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
|
||||
projectId: json["ProjectID"],
|
||||
clinicId: json["ClinicID"],
|
||||
doctorId: json["DoctorID"],
|
||||
patientId: json["PatientID"],
|
||||
doctorName: json["DoctorName"],
|
||||
doctorNameN: json["DoctorNameN"],
|
||||
firstName: json["FirstName"],
|
||||
middleName: json["MiddleName"],
|
||||
lastName: json["LastName"],
|
||||
firstNameN: json["FirstNameN"],
|
||||
middleNameN: json["MiddleNameN"],
|
||||
lastNameN: json["LastNameN"],
|
||||
gender: json["Gender"],
|
||||
dateofBirth: json["DateofBirth"],
|
||||
nationalityId: json["NationalityID"],
|
||||
mobileNumber: json["MobileNumber"],
|
||||
emailAddress: json["EmailAddress"],
|
||||
patientIdentificationNo: json["PatientIdentificationNo"],
|
||||
patientType: json["PatientType"],
|
||||
admissionNo: json["AdmissionNo"],
|
||||
admissionDate: json["AdmissionDate"],
|
||||
roomId: json["RoomID"],
|
||||
bedId: json["BedID"],
|
||||
nursingStationId: json["NursingStationID"],
|
||||
description: json["Description"],
|
||||
clinicDescription: json["ClinicDescription"],
|
||||
clinicDescriptionN: json["ClinicDescriptionN"],
|
||||
nationalityName: json["NationalityName"],
|
||||
nationalityNameN: json["NationalityNameN"],
|
||||
age: json["Age"],
|
||||
genderDescription: json["GenderDescription"],
|
||||
nursingStationName: json["NursingStationName"],
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||
import 'package:doctor_app_flutter/models/patient_model.dart';
|
||||
import 'package:doctor_app_flutter/providers/patients_provider.dart';
|
||||
import 'package:doctor_app_flutter/routes.dart';
|
||||
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../../widgets/shared/app_scaffold_widget.dart';
|
||||
import '../../../../widgets/shared/card_with_bg_widget.dart';
|
||||
|
||||
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||
|
||||
/*
|
||||
*@author: Elham Rababah
|
||||
*@Date:26/4/2020
|
||||
*@param:
|
||||
*@return:VitalSignScreen
|
||||
*@desc: VitalSignScreen class
|
||||
*/
|
||||
class VitalSignScreen extends StatefulWidget {
|
||||
@override
|
||||
_VitalSignScreenState createState() => _VitalSignScreenState();
|
||||
}
|
||||
|
||||
class _VitalSignScreenState extends State<VitalSignScreen> {
|
||||
List<String> litems = [
|
||||
"1",
|
||||
"1",
|
||||
"1",
|
||||
];
|
||||
|
||||
var _isLoading = true;
|
||||
var _hasError;
|
||||
var _isInit = true;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||
var patient = routeArgs['patient'];
|
||||
print(patient);
|
||||
// String patientType = routeArgs['selectedType'];
|
||||
// print(patientType);
|
||||
sharedPref.getString(TOKEN).then((token) {
|
||||
print(token);
|
||||
var model = {
|
||||
"PatientID": patient['PatientID'],
|
||||
"ProjectID": patient['ProjectID'],
|
||||
"PatientTypeID": patient['PatientType'],
|
||||
"InOutPatientType": 1,
|
||||
"TransNo":patient['AdmissionNo'] !=null ? int.parse(patient['AdmissionNo']) : 0,
|
||||
"LanguageID": 2,
|
||||
"stamp": "2020-04-26T09:32:18.317Z",
|
||||
"IPAdress": "11.11.11.11",
|
||||
"VersionID": 1.2,
|
||||
"Channel": 9,
|
||||
"TokenID": token,
|
||||
"SessionID": "E2bsEeYEJo",
|
||||
"IsLoginForDoctorApp": true,
|
||||
"PatientOutSA": false
|
||||
};
|
||||
if (_isInit) {
|
||||
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
|
||||
patientsProv.getPatientVitalSign(model).then((res) {
|
||||
print('wwww');
|
||||
debugPrint("${res}");
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
_hasError = res['ErrorEndUserMessage'];
|
||||
});
|
||||
print(res);
|
||||
}).catchError((error) {
|
||||
print(error);
|
||||
});
|
||||
}
|
||||
_isInit = false;
|
||||
});
|
||||
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: "VITAL SIGN",
|
||||
body: Container(
|
||||
child: Column(
|
||||
children: litems.map((item) {
|
||||
return InkWell(
|
||||
child: CardWithBgWidget(
|
||||
line1Text: 'Fahad AlSlehm - 324599',
|
||||
line2Text: '12/04/2020 - 02:00 PM',
|
||||
heightPercentage: 0.15,
|
||||
widthPercentage: 0.80),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(VITAL_SIGN);
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue