Merge branch 'Haroon' into 'master'
working on ereferral See merge request Cloud_Solution/diplomatic-quarter!141merge-requests/224/merge
commit
bda6f58aa3
@ -0,0 +1,128 @@
|
||||
class GetEReferralResponseModel {
|
||||
dynamic acceptedBrachCode;
|
||||
dynamic acceptedBranchName;
|
||||
dynamic acceptedBranchNameAr;
|
||||
Channel channel;
|
||||
dynamic identityCardAttachment;
|
||||
String identityNumber;
|
||||
dynamic insuranceCardAttachment;
|
||||
bool isInsuredPatient;
|
||||
String otherRelationship;
|
||||
String patientContactNo;
|
||||
int patientId;
|
||||
String patientName;
|
||||
int preferredBranchCode;
|
||||
String preferredBranchName;
|
||||
String referralDate;
|
||||
int referralNumber;
|
||||
Channel relationshipType;
|
||||
String requesterContactNo;
|
||||
String requesterName;
|
||||
String status;
|
||||
String statusAr;
|
||||
|
||||
GetEReferralResponseModel(
|
||||
{this.acceptedBrachCode,
|
||||
this.acceptedBranchName,
|
||||
this.acceptedBranchNameAr,
|
||||
this.channel,
|
||||
this.identityCardAttachment,
|
||||
this.identityNumber,
|
||||
this.insuranceCardAttachment,
|
||||
this.isInsuredPatient,
|
||||
this.otherRelationship,
|
||||
this.patientContactNo,
|
||||
this.patientId,
|
||||
this.patientName,
|
||||
this.preferredBranchCode,
|
||||
this.preferredBranchName,
|
||||
this.referralDate,
|
||||
this.referralNumber,
|
||||
this.relationshipType,
|
||||
this.requesterContactNo,
|
||||
this.requesterName,
|
||||
this.status,
|
||||
this.statusAr});
|
||||
|
||||
GetEReferralResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
acceptedBrachCode = json['AcceptedBrachCode'];
|
||||
acceptedBranchName = json['AcceptedBranchName'];
|
||||
acceptedBranchNameAr = json['AcceptedBranchNameAr'];
|
||||
channel =
|
||||
json['Channel'] != null ? new Channel.fromJson(json['Channel']) : null;
|
||||
identityCardAttachment = json['IdentityCardAttachment'];
|
||||
identityNumber = json['IdentityNumber'];
|
||||
insuranceCardAttachment = json['InsuranceCardAttachment'];
|
||||
isInsuredPatient = json['IsInsuredPatient'];
|
||||
otherRelationship = json['OtherRelationship'];
|
||||
patientContactNo = json['PatientContactNo'];
|
||||
patientId = json['PatientId'];
|
||||
patientName = json['PatientName'];
|
||||
preferredBranchCode = json['PreferredBranchCode'];
|
||||
preferredBranchName = json['PreferredBranchName'];
|
||||
referralDate = json['ReferralDate'];
|
||||
referralNumber = json['ReferralNumber'];
|
||||
relationshipType = json['RelationshipType'] != null
|
||||
? new Channel.fromJson(json['RelationshipType'])
|
||||
: null;
|
||||
requesterContactNo = json['RequesterContactNo'];
|
||||
requesterName = json['RequesterName'];
|
||||
status = json['Status'];
|
||||
statusAr = json['StatusAr'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AcceptedBrachCode'] = this.acceptedBrachCode;
|
||||
data['AcceptedBranchName'] = this.acceptedBranchName;
|
||||
data['AcceptedBranchNameAr'] = this.acceptedBranchNameAr;
|
||||
if (this.channel != null) {
|
||||
data['Channel'] = this.channel.toJson();
|
||||
}
|
||||
data['IdentityCardAttachment'] = this.identityCardAttachment;
|
||||
data['IdentityNumber'] = this.identityNumber;
|
||||
data['InsuranceCardAttachment'] = this.insuranceCardAttachment;
|
||||
data['IsInsuredPatient'] = this.isInsuredPatient;
|
||||
data['OtherRelationship'] = this.otherRelationship;
|
||||
data['PatientContactNo'] = this.patientContactNo;
|
||||
data['PatientId'] = this.patientId;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['PreferredBranchCode'] = this.preferredBranchCode;
|
||||
data['PreferredBranchName'] = this.preferredBranchName;
|
||||
data['ReferralDate'] = this.referralDate;
|
||||
data['ReferralNumber'] = this.referralNumber;
|
||||
if (this.relationshipType != null) {
|
||||
data['RelationshipType'] = this.relationshipType.toJson();
|
||||
}
|
||||
data['RequesterContactNo'] = this.requesterContactNo;
|
||||
data['RequesterName'] = this.requesterName;
|
||||
data['Status'] = this.status;
|
||||
data['StatusAr'] = this.statusAr;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Channel {
|
||||
int iD;
|
||||
String text;
|
||||
String textAr;
|
||||
String textEn;
|
||||
|
||||
Channel({this.iD, this.text, this.textAr, this.textEn});
|
||||
|
||||
Channel.fromJson(Map<String, dynamic> json) {
|
||||
iD = json['ID'];
|
||||
text = json['Text'];
|
||||
textAr = json['Text_Ar'];
|
||||
textEn = json['Text_En'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ID'] = this.iD;
|
||||
data['Text'] = this.text;
|
||||
data['Text_Ar'] = this.textAr;
|
||||
data['Text_En'] = this.textEn;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ReferralDetails extends StatefulWidget {
|
||||
GetEReferralResponseModel getEReferralResponseModel;
|
||||
|
||||
ReferralDetails({@required this.getEReferralResponseModel});
|
||||
|
||||
@override
|
||||
_ReferralDetailsState createState() => _ReferralDetailsState();
|
||||
}
|
||||
|
||||
class _ReferralDetailsState extends State<ReferralDetails> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowDecPage: false,
|
||||
isShowAppBar: true,
|
||||
appBarTitle: "Referral Details",
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
|
||||
child: Table(
|
||||
border: TableBorder.all(color: Colors.grey[600]),
|
||||
children: [
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).referralStatus)),
|
||||
TableCell(
|
||||
child:
|
||||
_getNormalText(widget.getEReferralResponseModel.status)),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child:
|
||||
_getNormalText(TranslationBase.of(context).patientName)),
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
widget.getEReferralResponseModel.patientName)),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).referralNumber)),
|
||||
TableCell(
|
||||
child: _getNormalText(widget
|
||||
.getEReferralResponseModel.referralNumber
|
||||
.toString())),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).referralDate)),
|
||||
TableCell(
|
||||
child: _getNormalText(DateUtil.getMonthDayYearDateFormatted(
|
||||
DateUtil.convertStringToDateNoTimeZone(
|
||||
widget.getEReferralResponseModel.referralDate)))),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(TranslationBase.of(context).hospital)),
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
widget.getEReferralResponseModel.preferredBranchName)),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getNormalText(text) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 12.0, bottom: 12.0),
|
||||
child: Text(text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Open-Sans',
|
||||
letterSpacing: 0.5,
|
||||
color: Colors.grey[800])),
|
||||
);
|
||||
}
|
||||
|
||||
_getHeadingText(text) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(bottom: 10.0),
|
||||
child: Text(text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 26.0,
|
||||
fontFamily: 'Open-Sans',
|
||||
letterSpacing: 0.5,
|
||||
color: Colors.white)));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue