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_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL =

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

Loading…
Cancel
Save