working on referral card

merge-requests/402/head
mosazaid 5 years ago
parent caff27923b
commit f7e0e89bce

@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = const PATIENT_PROGRESS_NOTE_URL =

@ -227,13 +227,16 @@ class PatientCard extends StatelessWidget {
"List_MyOutPatient") "List_MyOutPatient")
Container( Container(
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( Expanded(
TranslationBase.of(context) child: AppText(
.appointmentDate + TranslationBase.of(context)
" : ", .appointmentDate +
fontSize: 14, " : ",
fontSize: 14,
),
), ),
patientInfo.startTimes != null patientInfo.startTimes != null
? Container( ? Container(

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -7,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
class PatientReferralItemWidget extends StatelessWidget { class PatientReferralItemWidget extends StatelessWidget {
final String patientName; final String patientName;
@ -39,6 +41,8 @@ class PatientReferralItemWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0), margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column( child: Column(
@ -298,7 +302,8 @@ class PatientReferralItemWidget extends StatelessWidget {
: Colors.grey[500], : Colors.grey[500],
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)), fontSize:
2.0 * SizeConfig.textMultiplier)),
], ],
), ),
), ),
@ -325,15 +330,15 @@ class PatientReferralItemWidget extends StatelessWidget {
SizedBox( SizedBox(
width: 4, width: 4,
), ),
/*patient.gender*/1 == 1 /*patient.gender*/ 1 == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
) )
: Icon( : Icon(
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
], ],
), ),
SizedBox( SizedBox(
@ -351,7 +356,8 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).fileNumber, text: TranslationBase.of(context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')), fontSize: 14, fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
@ -371,13 +377,17 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).referredFrom, text: TranslationBase.of(context)
.referredFrom,
style: TextStyle( style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')), fontSize: 14,
fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: isSameBranch text: isSameBranch
? TranslationBase.of(context).sameBranch ? TranslationBase.of(context)
: TranslationBase.of(context).otherBranch, .sameBranch
: TranslationBase.of(context)
.otherBranch,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -392,11 +402,12 @@ class PatientReferralItemWidget extends StatelessWidget {
children: [ children: [
AppText( AppText(
/*patient.nationalityName ?? /*patient.nationalityName ??
patient.nationality*/ "Saudi", patient.nationality*/
"Saudi",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
/* patient.nationality != null /* patient.nationality != null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius:
BorderRadius BorderRadius
@ -418,7 +429,7 @@ class PatientReferralItemWidget extends StatelessWidget {
'No Image'); 'No Image');
}, },
))*/ ))*/
/*:*/ SizedBox() /*:*/ SizedBox()
], ],
) )
], ],
@ -445,32 +456,56 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
), ),
), ),
SizedBox( Row(
height: 20, crossAxisAlignment: CrossAxisAlignment.start,
),
Column(
children: [ children: [
RichText( Container(
text: TextSpan( width: 30,
style: TextStyle( height: 30,
fontSize: 2.0 * SizeConfig.textMultiplier, margin: EdgeInsets.only(
color: Colors.black), left: projectViewModel.isArabic ? 10 : 10 /*10:85*/,
children: <TextSpan>[ right: projectViewModel.isArabic ? 10 : 10 /*85:10*/,
TextSpan( top: 5),
text: TranslationBase.of(context) decoration: BoxDecoration(
.referralDoctor + shape: BoxShape.rectangle,
" : ", border: Border(
style: TextStyle( bottom:
fontSize: 14, fontFamily: 'Poppins')), BorderSide(color: Colors.grey[400], width: 2.5),
TextSpan( left:
text: referralDoctorName, BorderSide(color: Colors.grey[400], width: 2.5),
style: TextStyle( )),
fontWeight: FontWeight.w700, ),
fontFamily: 'Poppins', Expanded(
fontSize: 15)), flex: 4,
], child: Container(
margin: EdgeInsets.only(left: 10, top: 25, right : 10, bottom: 0),
child: Column(
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context)
.referralDoctor +
" : ",
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')),
TextSpan(
text: referralDoctorName,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
)
],
),
), ),
) ),
], ],
), ),
Container( Container(

Loading…
Cancel
Save