fix issues related to card

merge-requests/928/head
Elham Rababh 4 years ago
parent 3e1ac71a48
commit 4dcc20b681

@ -5,8 +5,8 @@ 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_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
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 =

@ -208,64 +208,31 @@ class PatientCard extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
) )
: patientInfo.arrivedOn != null : patientInfo.arrivedOn != null
? Column( ? Container(
crossAxisAlignment: padding: EdgeInsets.only(right: 9),
CrossAxisAlignment.end,
mainAxisAlignment: child: AppText(
MainAxisAlignment.start, "${AppDateUtils.getStartTime(patientInfo.startTime)}",
children: [ fontFamily: 'Poppins',
AppText( fontWeight: FontWeight.w600,
AppDateUtils fontSize: 11,
.getDayMonthYearDateFormatted( letterSpacing: -0.64,
AppDateUtils ),
.convertStringToDate( )
patientInfo.arrivedOn, : (patientInfo.appointmentDate !=
), null &&
isMonthShort: true, patientInfo
), .appointmentDate.isNotEmpty)
fontFamily: 'Poppins', ? Container(
fontWeight: FontWeight.w600, padding: EdgeInsets.only(right: 9),
fontSize: 11, child: AppText(
letterSpacing: -0.64, " ${AppDateUtils.getStartTime(patientInfo.startTime)}",
),
AppText(
"${AppDateUtils.getStartTime(patientInfo.startTime)}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 11, fontSize: 11,
letterSpacing: -0.64, letterSpacing: -0.64,
), ),
], )
)
: (patientInfo.appointmentDate !=
null &&
patientInfo
.appointmentDate.isNotEmpty)
? Column(
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(
patientInfo
.appointmentDate,
), isMonthShort: true)}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 11,
letterSpacing: -0.64,
),
AppText(
" ${AppDateUtils.getStartTime(patientInfo.startTime)}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 11,
letterSpacing: -0.64,
),
],
)
: SizedBox() : SizedBox()
], ],
)) ))
@ -311,12 +278,18 @@ class PatientCard extends StatelessWidget {
), ),
if (patientInfo.gender == 1) if (patientInfo.gender == 1)
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), padding: EdgeInsets.symmetric(
child: SvgPicture.asset("assets/images/svgs/male.svg"),) horizontal: 4, vertical: 2),
child: SvgPicture.asset(
"assets/images/svgs/male.svg"),
)
else else
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), padding: EdgeInsets.symmetric(
child: SvgPicture.asset("assets/images/svgs/female.svg"),), horizontal: 4, vertical: 2),
child: SvgPicture.asset(
"assets/images/svgs/female.svg"),
),
if (isFromLiveCare) if (isFromLiveCare)
ShowTimer( ShowTimer(
patientInfo: patientInfo, patientInfo: patientInfo,
@ -345,7 +318,8 @@ class PatientCard extends StatelessWidget {
patientInfo.nationality != null || patientInfo.nationality != null ||
patientInfo.nationalityId != null patientInfo.nationalityId != null
? Container( ? Container(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(
right: 7, top: 5),
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.circular(20.0), BorderRadius.circular(20.0),
@ -416,6 +390,69 @@ class PatientCard extends StatelessWidget {
value: value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}", "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
), ),
patientInfo.arrivedOn != null
? Column(
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// AppDateUtils
// .getDayMonthYearDateFormatted(
// AppDateUtils
// .convertStringToDate(
// patientInfo.arrivedOn,
// ),
// isMonthShort: true,
// ),
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w600,
// fontSize: 11,
// letterSpacing: -0.64,
// ),
CustomRow(
label: TranslationBase.of(
context)
.arrivedP +
" : ",
value: AppDateUtils
.getDayMonthYearDateFormatted(
AppDateUtils
.convertStringToDate(
patientInfo.arrivedOn,
),
isMonthShort: true,
),
),
],
)
: (patientInfo.appointmentDate !=
null &&
patientInfo.appointmentDate
.isNotEmpty)
? Column(
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(
context)
.appointmentDate +
" : ",
value: "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(
patientInfo
.appointmentDate,
), isMonthShort: true)}",
),
],
)
: SizedBox(),
if (isInpatient) if (isInpatient)
CustomRow( CustomRow(
label: label:
@ -465,9 +502,12 @@ class PatientCard extends StatelessWidget {
), ),
]), ]),
), ),
Icon( Padding(
Icons.arrow_forward, padding: const EdgeInsets.only(right: 8),
size: 24, child: Icon(
Icons.arrow_forward,
size: 24,
),
), ),
], ],
)) ))
@ -477,7 +517,8 @@ class PatientCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Container( Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.only(
left: 9, right: 9, bottom: 9),
child: SvgPicture.asset( child: SvgPicture.asset(
'assets/images/svgs/profile_screen/livecare.svg', 'assets/images/svgs/profile_screen/livecare.svg',
height: 20, height: 20,
@ -493,7 +534,7 @@ class PatientCard extends StatelessWidget {
children: [ children: [
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 13, right: 13, bottom: 13), left: 9, right: 9, bottom: 9),
child: SvgPicture.asset( child: SvgPicture.asset(
patientInfo.appointmentType == patientInfo.appointmentType ==
'Regular' && 'Regular' &&
@ -515,9 +556,9 @@ class PatientCard extends StatelessWidget {
children: [ children: [
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 13, left: 9,
right: 13, right: 9,
bottom: 13), bottom: 9),
child: SvgPicture.asset( child: SvgPicture.asset(
'assets/images/svgs/inpatient.svg', 'assets/images/svgs/inpatient.svg',
height: 25, height: 25,

Loading…
Cancel
Save