patient medical info
parent
8aaf96a734
commit
35205b7024
@ -0,0 +1,87 @@
|
||||
/*
|
||||
*@author: Ibrahim Albitar
|
||||
*@Date:15/5/2020
|
||||
|
||||
*@param:
|
||||
{"PatientID":1089227,
|
||||
"PatientTypeID":1,
|
||||
"EXuldAPPNO":0,
|
||||
"ProjectID":12,
|
||||
"LanguageID":2,
|
||||
"stamp":"2020-04-01T09:47:19.643Z",
|
||||
"IPAdress":"11.11.11.11",
|
||||
"VersionID":1.2,
|
||||
"Channel":9,
|
||||
"TokenID":"yIwh6wNyUkOeQlJRohWjyw==",
|
||||
"SessionID":"LlBk8lUEJY",
|
||||
"IsLoginForDoctorApp":true,
|
||||
"PatientOutSA":false}
|
||||
|
||||
*@return:
|
||||
*@desc:
|
||||
*/
|
||||
class InsuranceAprovalsRequest {
|
||||
int exuldAppNO;
|
||||
int patientID;
|
||||
int channel;
|
||||
int projectID;
|
||||
int languageID;
|
||||
String stamp;
|
||||
String ipAdress;
|
||||
double versionID;
|
||||
String tokenID;
|
||||
String sessionID;
|
||||
bool isLoginForDoctorApp;
|
||||
bool patientOutSA;
|
||||
int patientTypeID;
|
||||
|
||||
InsuranceAprovalsRequest(
|
||||
{
|
||||
this.exuldAppNO,
|
||||
this.patientID,
|
||||
this.channel = 9,
|
||||
this.projectID = 12,
|
||||
this.patientTypeID = 1,
|
||||
this.languageID = 2,
|
||||
this.stamp = '2020-04-23T21:01:21.492Z',
|
||||
this.ipAdress = '11.11.11.11',
|
||||
this.versionID = 1.2,
|
||||
this.tokenID = '@dm!n',
|
||||
this.sessionID = 'e29zoooEJ4',
|
||||
this.isLoginForDoctorApp = true,
|
||||
this.patientOutSA = false});
|
||||
|
||||
InsuranceAprovalsRequest.fromJson(Map<String, dynamic> json) {
|
||||
exuldAppNO = json['EXuldAPPNO'];
|
||||
patientID = json['PatientID'];
|
||||
channel = json['Channel'];
|
||||
projectID = json['ProjectID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
languageID = json['LanguageID'];
|
||||
stamp = json['stamp'];
|
||||
ipAdress = json['IPAdress'];
|
||||
versionID = json['VersionID'];
|
||||
tokenID = json['TokenID'];
|
||||
sessionID = json['SessionID'];
|
||||
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['EXuldAPPNO'] = this.exuldAppNO;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['Channel'] = this.channel;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['stamp'] = this.stamp;
|
||||
data['IPAdress'] = this.ipAdress;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
|
||||
/*
|
||||
*@author: Ibrahim Albitar
|
||||
*@Date:15/5/2020
|
||||
|
||||
*@param:
|
||||
{"VisitType":3,
|
||||
"AdmissionNo":2020004683,
|
||||
"ProjectID":12,
|
||||
"LanguageID":2,
|
||||
"stamp":"2020-04-01T09:53:50.410Z",
|
||||
"IPAdress":"11.11.11.11",
|
||||
"VersionID":1.2,
|
||||
"Channel":9,
|
||||
"TokenID":"yIwh6wNyUkOeQlJRohWjyw==",
|
||||
"SessionID":"LlBk8lUEJY",
|
||||
"IsLoginForDoctorApp":true,
|
||||
"PatientOutSA":false,
|
||||
"PatientTypeID":1}
|
||||
|
||||
*@return:
|
||||
*@desc:
|
||||
*/
|
||||
|
||||
class OrdersRequest {
|
||||
int visitType;
|
||||
int admissionNo;
|
||||
int projectID;
|
||||
int languageID;
|
||||
String stamp;
|
||||
String iPAdress;
|
||||
int channel;
|
||||
String tokenID;
|
||||
String sessionID;
|
||||
bool isLoginForDoctorApp;
|
||||
bool patientOutSA;
|
||||
int patientTypeID;
|
||||
double versionID;
|
||||
|
||||
OrdersRequest(
|
||||
{this.visitType ,
|
||||
this.admissionNo,
|
||||
this.projectID = 12,
|
||||
this.stamp = '2020-04-23T21:01:21.492Z',
|
||||
this.languageID = 2,
|
||||
this.iPAdress = '11.11.11.11',
|
||||
this.channel = 9,
|
||||
this.tokenID = '@dm!n',
|
||||
this.sessionID = "LlBk8lUEJY",
|
||||
this.isLoginForDoctorApp = true,
|
||||
this.patientTypeID = 1,
|
||||
this.versionID = 1.2,
|
||||
this.patientOutSA = false});
|
||||
|
||||
OrdersRequest.fromJson(Map<String, dynamic> json) {
|
||||
visitType = json['VisitType'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
projectID = json['ProjectID'];
|
||||
stamp = json['stamp'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
channel = json['Channel'];
|
||||
tokenID = json['TokenID'];
|
||||
sessionID = json['SessionID'];
|
||||
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
versionID = json['VersionID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['VisitType'] = this.visitType;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['stamp'] = this.stamp;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['Channel'] = this.channel;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['VersionID'] = this.versionID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
|
||||
/*
|
||||
*@author: Ibrahim Albitar
|
||||
*@Date:15/5/2020
|
||||
|
||||
*@param:
|
||||
{"VisitType":5,
|
||||
"AdmissionNo":2020004683,
|
||||
"ProjectID":12,
|
||||
"LanguageID":2,
|
||||
"stamp":"2020-04-01T09:41:59.089Z",
|
||||
"IPAdress":"11.11.11.11",
|
||||
"VersionID":1.2,
|
||||
"Channel":9,
|
||||
"TokenID":"yIwh6wNyUkOeQlJRohWjyw==",
|
||||
"SessionID":"LlBk8lUEJY",
|
||||
"IsLoginForDoctorApp":true,
|
||||
"PatientOutSA":false,
|
||||
"PatientTypeID":1}
|
||||
|
||||
*@return:
|
||||
*@desc:
|
||||
*/
|
||||
|
||||
class ProgressNoteRequest {
|
||||
int visitType;
|
||||
int admissionNo;
|
||||
int projectID;
|
||||
int languageID;
|
||||
String stamp;
|
||||
String iPAdress;
|
||||
int channel;
|
||||
String tokenID;
|
||||
String sessionID;
|
||||
bool isLoginForDoctorApp;
|
||||
bool patientOutSA;
|
||||
int patientTypeID;
|
||||
double versionID;
|
||||
|
||||
ProgressNoteRequest(
|
||||
{this.visitType ,
|
||||
this.admissionNo,
|
||||
this.projectID = 12,
|
||||
this.stamp = '2020-04-23T21:01:21.492Z',
|
||||
this.languageID = 2,
|
||||
this.iPAdress = '11.11.11.11',
|
||||
this.channel = 9,
|
||||
this.tokenID = '@dm!n',
|
||||
this.sessionID = "LlBk8lUEJY",
|
||||
this.isLoginForDoctorApp = true,
|
||||
this.patientTypeID = 1,
|
||||
this.versionID = 1.2,
|
||||
this.patientOutSA = false});
|
||||
|
||||
ProgressNoteRequest.fromJson(Map<String, dynamic> json) {
|
||||
visitType = json['VisitType'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
projectID = json['ProjectID'];
|
||||
stamp = json['stamp'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
channel = json['Channel'];
|
||||
tokenID = json['TokenID'];
|
||||
sessionID = json['SessionID'];
|
||||
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
versionID = json['VersionID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['VisitType'] = this.visitType;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['stamp'] = this.stamp;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['Channel'] = this.channel;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['VersionID'] = this.versionID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
|
||||
import 'package:doctor_app_flutter/routes.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../config/shared_pref_kay.dart';
|
||||
import '../../../config/size_config.dart';
|
||||
import '../../../models/patient/patiant_info_model.dart';
|
||||
import '../../../providers/patients_provider.dart';
|
||||
import '../../../util/dr_app_shared_pref.dart';
|
||||
import '../../../widgets/shared/app_scaffold_widget.dart';
|
||||
import '../../../widgets/shared/app_texts_widget.dart';
|
||||
import '../../../widgets/shared/card_with_bg_widget.dart';
|
||||
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
|
||||
import '../../../widgets/shared/profile_image_widget.dart';
|
||||
|
||||
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||
|
||||
/*
|
||||
*@author: ibrahim albitar
|
||||
*@Date:15/5/2020
|
||||
*@param:
|
||||
*@return:
|
||||
*@desc:
|
||||
*/
|
||||
|
||||
class ProgressNoteScreen extends StatefulWidget {
|
||||
@override
|
||||
_ProgressNoteState createState() => _ProgressNoteState();
|
||||
}
|
||||
|
||||
class _ProgressNoteState extends State<ProgressNoteScreen> {
|
||||
PatientsProvider patientsProv;
|
||||
var _isInit = true;
|
||||
|
||||
/*
|
||||
*@author: ibrahim al bitar
|
||||
*@Date:16/5/2020
|
||||
*@param:
|
||||
*@return:
|
||||
*@desc:
|
||||
*/
|
||||
getProgressNoteList(context) async {
|
||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||
PatiantInformtion patient = routeArgs['patient'];
|
||||
String token = await sharedPref.getString(TOKEN);
|
||||
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
|
||||
|
||||
print(type);
|
||||
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
|
||||
visitType: 5,
|
||||
admissionNo: int.parse(patient.admissionNo),
|
||||
projectID: patient.projectId,
|
||||
tokenID: token,
|
||||
patientTypeID: patient.patientType,
|
||||
languageID: 2);
|
||||
patientsProv.getPatientProgressNote(progressNoteRequest.toJson());
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
if (_isInit) {
|
||||
patientsProv = Provider.of<PatientsProvider>(context);
|
||||
getProgressNoteList(context);
|
||||
}
|
||||
_isInit = false;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: "Progress Note",
|
||||
showAppDrawer: false,
|
||||
showBottomBar: false,
|
||||
body: patientsProv.isLoading
|
||||
? DrAppCircularProgressIndeicator()
|
||||
: patientsProv.isError
|
||||
? DrAppEmbeddedError(error: patientsProv.error)
|
||||
: patientsProv.patientVitalSignList.length == 0
|
||||
? DrAppEmbeddedError(error: 'You don\'t have any Progress Note')
|
||||
: Container(
|
||||
margin: EdgeInsets.fromLTRB(
|
||||
SizeConfig.realScreenWidth * 0.05,
|
||||
0,
|
||||
SizeConfig.realScreenWidth * 0.05,
|
||||
0),
|
||||
child: ListView.builder(
|
||||
itemCount: patientsProv.patientProgressNoteList.length,
|
||||
itemBuilder: (BuildContext ctxt, int index) {
|
||||
return AppText(patientsProv.patientProgressNoteList[index]["DoctorName"].toString());
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue