Merge branch 'development' into home-refactoring

# Conflicts:
#	lib/screens/home/home_screen.dart
merge-requests/648/head
mosazaid 5 years ago
commit 12bb283a68

@ -86,7 +86,7 @@ class Prescriptions {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
companyName = json['CompanyName']; companyName = json['CompanyName'];
despensedStatus = json['Despensed_Status']; despensedStatus = json['Despensed_Status'];
dischargeDate = DateUtils.convertStringToDate(json['DischargeDate']); dischargeDate = AppDateUtils.convertStringToDate(json['DischargeDate']);
dischargeNo = json['DischargeNo']; dischargeNo = json['DischargeNo'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];

@ -79,10 +79,10 @@ class PrescriptionsOrder {
status = json['Status']; status = json['Status'];
description = json['Description']; description = json['Description'];
descriptionN = json['DescriptionN']; descriptionN = json['DescriptionN'];
createdOn = DateUtils.convertStringToDate(json['CreatedOn']); createdOn = AppDateUtils.convertStringToDate(json['CreatedOn']);
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
createdBy = json['CreatedBy']; createdBy = json['CreatedBy'];
editedOn = DateUtils.convertStringToDate(json['EditedOn']); editedOn = AppDateUtils.convertStringToDate(json['EditedOn']);
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
channel = json['Channel']; channel = json['Channel'];
clientRequestID = json['ClientRequestID']; clientRequestID = json['ClientRequestID'];

@ -95,7 +95,7 @@ class PatientLabOrders {
isRead = json['IsRead']; isRead = json['IsRead'];
nationalityFlagURL = json['NationalityFlagURL']; nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate']; noOfPatientsRate = json['NoOfPatientsRate'];
orderDate = DateUtils.convertStringToDate(json['OrderDate']); orderDate = AppDateUtils.convertStringToDate(json['OrderDate']);
orderNo = json['OrderNo'].toString(); orderNo = json['OrderNo'].toString();
patientID = json['PatientID'].toString(); patientID = json['PatientID'].toString();
projectID = json['ProjectID'].toString(); projectID = json['ProjectID'].toString();

@ -42,7 +42,7 @@ class PatientMuseResultsModel {
imageURL = json['ImageURL']; imageURL = json['ImageURL'];
createdBy = json['CreatedBy']; createdBy = json['CreatedBy'];
createdOn = json['CreatedOn']; createdOn = json['CreatedOn'];
createdOnDateTime = DateUtils.getDateTimeFromServerFormat(json['CreatedOn']); createdOnDateTime = AppDateUtils.getDateTimeFromServerFormat(json['CreatedOn']);
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {

@ -96,8 +96,8 @@ class FinalRadiology {
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
orderDate = DateUtils.convertStringToDate(json['OrderDate']); orderDate = AppDateUtils.convertStringToDate(json['OrderDate']);
reportDate = DateUtils.convertStringToDate(json['ReportDate']); reportDate = AppDateUtils.convertStringToDate(json['ReportDate']);
reportData = json['ReportData']; reportData = json['ReportData'];
imageURL = json['ImageURL']; imageURL = json['ImageURL'];
procedureID = json['ProcedureID']; procedureID = json['ProcedureID'];

@ -139,7 +139,7 @@ class DischargeReferralPatient {
referralClinic = json['ReferralClinic']; referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic']; referringClinic = json['ReferringClinic'];
referralStatus = json['ReferralStatus']; referralStatus = json['ReferralStatus'];
referralDate = DateUtils.convertStringToDate(json['ReferralDate']); referralDate = AppDateUtils.convertStringToDate(json['ReferralDate']);
referringDoctorRemarks = json['ReferringDoctorRemarks']; referringDoctorRemarks = json['ReferringDoctorRemarks'];
referredDoctorRemarks = json['ReferredDoctorRemarks']; referredDoctorRemarks = json['ReferredDoctorRemarks'];
referralResponseOn = json['ReferralResponseOn']; referralResponseOn = json['ReferralResponseOn'];

@ -159,7 +159,7 @@ class MyReferralPatientModel {
referralClinic = json['ReferralClinic']; referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic']; referringClinic = json['ReferringClinic'];
referralStatus = json['ReferralStatus']; referralStatus = json['ReferralStatus'];
referralDate = DateUtils.convertStringToDate(json['ReferralDate']); referralDate = AppDateUtils.convertStringToDate(json['ReferralDate']);
referringDoctorRemarks = json['ReferringDoctorRemarks']; referringDoctorRemarks = json['ReferringDoctorRemarks'];
referredDoctorRemarks = json['ReferredDoctorRemarks']; referredDoctorRemarks = json['ReferredDoctorRemarks'];
referralResponseOn = json['ReferralResponseOn']; referralResponseOn = json['ReferralResponseOn'];

@ -2,13 +2,11 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart'; import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
@ -220,7 +218,7 @@ class PrescriptionService extends LookupService {
"Prescription": { "Prescription": {
"objPatientInfo": { "objPatientInfo": {
"Gender": patient.gender == 1 ? 'Male' : 'Female', "Gender": patient.gender == 1 ? 'Male' : 'Female',
"Age": DateUtils.convertDateFromServerFormat( "Age": AppDateUtils.convertDateFromServerFormat(
patient.dateofBirth, 'dd/MM/yyyy') patient.dateofBirth, 'dd/MM/yyyy')
}, },
"objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg}, "objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg},

@ -98,24 +98,24 @@ class PatientSearchViewModel extends BaseViewModel {
DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); DateTime.now().year, DateTime.now().month - 1, DateTime.now().day);
selectedToDate = DateTime( selectedToDate = DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
dateTo = DateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd'); dateTo = AppDateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd');
dateFrom = DateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); dateFrom = AppDateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd');
} else if (OutPatientFilterType.NextWeek == outPatientFilterType) { } else if (OutPatientFilterType.NextWeek == outPatientFilterType) {
dateTo = DateUtils.convertDateToFormat( dateTo = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month, DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6), DateTime.now().day + 6),
'yyyy-MM-dd'); 'yyyy-MM-dd');
dateFrom = DateUtils.convertDateToFormat( dateFrom = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month, DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1), DateTime.now().day + 1),
'yyyy-MM-dd'); 'yyyy-MM-dd');
} else { } else {
dateFrom = DateUtils.convertDateToFormat( dateFrom = AppDateUtils.convertDateToFormat(
DateTime( DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day), DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd'); 'yyyy-MM-dd');
dateTo = DateUtils.convertDateToFormat( dateTo = AppDateUtils.convertDateToFormat(
DateTime( DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day), DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd'); 'yyyy-MM-dd');

@ -61,10 +61,10 @@ class UcafViewModel extends BaseViewModel {
String from; String from;
String to; String to;
if (from == null || from == "0") { if (from == null || from == "0") {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); from = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if (to == null || to == "0") { if (to == null || to == "0") {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
// await _ucafService.getPatientVitalSignsHistory(patient, from, to); // await _ucafService.getPatientVitalSignsHistory(patient, from, to);

@ -46,10 +46,10 @@ class VitalSignsViewModel extends BaseViewModel {
String to, bool isInPatient) async { String to, bool isInPatient) async {
setState(ViewState.Busy); setState(ViewState.Busy);
if (from == null || from == "0") { if (from == null || from == "0") {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); from = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if (to == null || to == "0") { if (to == null || to == "0") {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if (isInPatient) { if (isInPatient) {

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.d
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart';

@ -15,7 +15,7 @@ class ListDoctorWorkingHoursTable {
}); });
ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) { ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) {
date = DateUtils.convertStringToDate(json['Date']); date = AppDateUtils.convertStringToDate(json['Date']);
dayName = json['DayName']; dayName = json['DayName'];
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
projectName = json['ProjectName']; projectName = json['ProjectName'];

@ -70,7 +70,7 @@ class ListGtMyPatientsQuestions {
patientID = json['PatientID']; patientID = json['PatientID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
requestType = json['RequestType']; requestType = json['RequestType'];
requestDate = DateUtils.convertStringToDate(json['RequestDate']) ; requestDate = AppDateUtils.convertStringToDate(json['RequestDate']) ;
requestTime = json['RequestTime']; requestTime = json['RequestTime'];
remarks = json['Remarks']; remarks = json['Remarks'];
status = json['Status']; status = json['Status'];

@ -62,7 +62,7 @@ class LabOrdersResModel {
status = json['Status']; status = json['Status'];
createdBy = json['CreatedBy']; createdBy = json['CreatedBy'];
createdByN = json['CreatedByN']; createdByN = json['CreatedByN'];
createdOn = DateUtils.convertStringToDate(json['CreatedOn']); createdOn = AppDateUtils.convertStringToDate(json['CreatedOn']);
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
editedByN = json['EditedByN']; editedByN = json['EditedByN'];
editedOn = json['EditedOn']; editedOn = json['EditedOn'];

@ -142,7 +142,7 @@ class MyReferralPatientModel {
referralResponseOn = json['ReferralResponseOn']; referralResponseOn = json['ReferralResponseOn'];
priority = json['Priority']; priority = json['Priority'];
frequency = json['Frequency']; frequency = json['Frequency'];
mAXResponseTime = DateUtils.convertStringToDate(json['MAXResponseTime']); mAXResponseTime = AppDateUtils.convertStringToDate(json['MAXResponseTime']);
age = json['Age']; age = json['Age'];
frequencyDescription = json['FrequencyDescription']; frequencyDescription = json['FrequencyDescription'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];

@ -125,7 +125,7 @@ class PrescriptionReportForInPatient {
orderNo = json['OrderNo']; orderNo = json['OrderNo'];
patientID = json['PatientID']; patientID = json['PatientID'];
pharmacyRemarks = json['PharmacyRemarks']; pharmacyRemarks = json['PharmacyRemarks'];
prescriptionDatetime = DateUtils.convertStringToDate(json['PrescriptionDatetime']); prescriptionDatetime = AppDateUtils.convertStringToDate(json['PrescriptionDatetime']);
prescriptionNo = json['PrescriptionNo']; prescriptionNo = json['PrescriptionNo'];
processedBy = json['ProcessedBy']; processedBy = json['ProcessedBy'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -138,11 +138,11 @@ class PrescriptionReportForInPatient {
routeId = json['RouteId']; routeId = json['RouteId'];
routeN = json['RouteN']; routeN = json['RouteN'];
setupID = json['SetupID']; setupID = json['SetupID'];
startDatetime = DateUtils.convertStringToDate(json['StartDatetime']) ; startDatetime = AppDateUtils.convertStringToDate(json['StartDatetime']) ;
status = json['Status']; status = json['Status'];
statusDescription = json['StatusDescription']; statusDescription = json['StatusDescription'];
statusDescriptionN = json['StatusDescriptionN']; statusDescriptionN = json['StatusDescriptionN'];
stopDatetime = DateUtils.convertStringToDate(json['StopDatetime']); stopDatetime = AppDateUtils.convertStringToDate(json['StopDatetime']);
unitofMeasurement = json['UnitofMeasurement']; unitofMeasurement = json['UnitofMeasurement'];
unitofMeasurementDescription = json['UnitofMeasurementDescription']; unitofMeasurementDescription = json['UnitofMeasurementDescription'];
unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN']; unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN'];

@ -170,7 +170,7 @@ class VitalSignResModel {
triageCategory = json['TriageCategory']; triageCategory = json['TriageCategory'];
gCScore = json['GCScore']; gCScore = json['GCScore'];
lineItemNo = json['LineItemNo']; lineItemNo = json['LineItemNo'];
vitalSignDate = json['VitalSignDate'] !=null? DateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now(); vitalSignDate = json['VitalSignDate'] !=null? AppDateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now();
actualTimeTaken = json['ActualTimeTaken']; actualTimeTaken = json['ActualTimeTaken'];
sugarLevel = json['SugarLevel']; sugarLevel = json['SugarLevel'];
fBS = json['FBS']; fBS = json['FBS'];

@ -164,14 +164,14 @@ class DoctorReplayChat extends StatelessWidget {
children: [ children: [
AppText( AppText(
reply.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(reply.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w600, .w600,
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
reply.createdOn !=null?DateUtils.getHour(DateUtils.getDateTimeFromServerFormat(reply.createdOn)):DateUtils.getHour(DateTime.now()), reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontSize: 14, fontSize: 14,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.white, color: Colors.white,

@ -24,9 +24,9 @@ class _PatientArrivalScreen extends State<PatientArrivalScreen>
PatientMobileNumber: "0", PatientMobileNumber: "0",
PatientIdentificationID: "0", PatientIdentificationID: "0",
PatientID: 0, PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') From: AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(), .toString(),
To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') To: AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(), .toString(),
LanguageID: 2, LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z", stamp: "2020-03-02T13:56:39.170Z",

@ -303,7 +303,7 @@ class _HomeScreenState extends State<HomeScreen> {
.myOutPatient, .myOutPatient,
onTap: () { onTap: () {
String date = String date =
DateUtils.convertDateToFormat( AppDateUtils.convertDateToFormat(
DateTime( DateTime(
DateTime.now().year, DateTime.now().year,
DateTime.now().month, DateTime.now().month,

@ -170,7 +170,7 @@ class _HealthSummaryPageState extends State<HealthSummaryPage> {
.timelines[index] .timelines[index]
.doctorImage, .doctorImage,
appointmentDate: appointmentDate:
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0] model.medicalFileList[0].entityList[0]
.timelines[index].date, .timelines[index].date,
), ),

@ -113,7 +113,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
isMedicalFile: true, isMedicalFile: true,
episode: episode, episode: episode,
vistDate: vistDate:
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(
vistDate, vistDate,
), isArabic: projectViewModel.isArabic)}', ), isArabic: projectViewModel.isArabic)}',
), ),
@ -629,7 +629,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
": ", ": ",
), ),
AppText( AppText(
DateUtils.getDateFormatted( AppDateUtils.getDateFormatted(
DateTime DateTime
.parse( .parse(
model model

@ -277,7 +277,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 14)),
new TextSpan( new TextSpan(
text: model.filterData[index].admissionDate == null ? "" text: model.filterData[index].admissionDate == null ? ""
: "${DateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15)), fontSize: 15)),
@ -301,7 +301,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 14)),
new TextSpan( new TextSpan(
text: model.filterData[index].dischargeDate == null ? "" text: model.filterData[index].dischargeDate == null ? ""
: "${DateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15)), fontSize: 15)),
@ -316,7 +316,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
fontSize: 14,fontWeight: FontWeight.w300, fontSize: 14,fontWeight: FontWeight.w300,
), ),
AppText( AppText(
"${DateUtils.convertStringToDate(model.filterData[index].dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}", "${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}",
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w700), fontWeight: FontWeight.w700),
], ],
@ -332,11 +332,12 @@ class _DischargedPatientState extends State<DischargedPatient> {
)), )),
], ],
), ),
))
],
), ),
), ),],
), ),
),)
); );
} }

@ -100,8 +100,8 @@ class ECGPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText('${DateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), AppText('${AppDateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,),
AppText('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), AppText('${AppDateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,),
], ],
), ),
), ),

@ -77,9 +77,9 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"isDischargedPatient": true, "isDischargedPatient": true,
"from": DateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat( "to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
@ -126,7 +126,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
: Colors.red[700], : Colors.red[700],
), ),
AppText( AppText(
DateUtils.getDayMonthYearDateFormatted( AppDateUtils.getDayMonthYearDateFormatted(
referredPatient.referralDate, referredPatient.referralDate,
), ),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -149,7 +149,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.admissionDate, referredPatient.admissionDate,
"dd MMM,yyyy"), "dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -174,7 +174,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.dischargeDate, referredPatient.dischargeDate,
"dd MMM,yyyy"), "dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -199,7 +199,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
"${DateUtils.convertStringToDate(referredPatient.dischargeDate).difference(DateUtils.convertStringToDate(referredPatient.admissionDate)).inDays + 1}", "${AppDateUtils.convertStringToDate(referredPatient.dischargeDate).difference(AppDateUtils.convertStringToDate(referredPatient.admissionDate)).inDays + 1}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: fontSize:
@ -435,7 +435,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.mAXResponseTime, referredPatient.mAXResponseTime,
"dd MMM,yyyy"), "dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',

@ -67,8 +67,8 @@ class _ReferralDischargedPatientPageState extends State<ReferralDischargedPatien
referralStatusCode: model.myDischargeReferralPatient[index].referralStatus, referralStatusCode: model.myDischargeReferralPatient[index].referralStatus,
patientName: model.myDischargeReferralPatient[index].firstName+" "+model.myDischargeReferralPatient[index].lastName, patientName: model.myDischargeReferralPatient[index].firstName+" "+model.myDischargeReferralPatient[index].lastName,
patientGender: model.myDischargeReferralPatient[index].gender, patientGender: model.myDischargeReferralPatient[index].gender,
referredDate: DateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate), referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate),
referredTime: DateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate), referredTime: AppDateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate),
patientID: "${model.myDischargeReferralPatient[index].patientID}", patientID: "${model.myDischargeReferralPatient[index].patientID}",
isSameBranch: false, isSameBranch: false,
isReferral: true, isReferral: true,

@ -273,7 +273,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight:
FontWeight.w600, FontWeight.w600,
@ -291,7 +291,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
color: Colors.grey[500], color: Colors.grey[500],
), ),
AppText( AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight:
FontWeight.w600, FontWeight.w600,
@ -650,7 +650,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight:
FontWeight.w600, FontWeight.w600,
@ -673,7 +673,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
.expiryDate != .expiryDate !=
null) null)
AppText( AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: fontWeight:
FontWeight.w600, FontWeight.w600,

@ -73,7 +73,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
widget.patientSearchViewModel widget.patientSearchViewModel
.selectedFromDate != .selectedFromDate !=
null null
? "${DateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}" ? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}"
: null, : null,
true, true,
suffixIcon: Icon( suffixIcon: Icon(
@ -102,7 +102,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
widget.patientSearchViewModel widget.patientSearchViewModel
.selectedToDate != .selectedToDate !=
null null
? "${DateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}" ? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}"
: null, : null,
true, true,
suffixIcon: Icon( suffixIcon: Icon(
@ -161,10 +161,10 @@ class _FilterDatePageState extends State<FilterDatePage> {
Helpers.showErrorToast( Helpers.showErrorToast(
"The difference between from date and end date must be less than 3 months"); "The difference between from date and end date must be less than 3 months");
} else { } else {
String dateTo = DateUtils.convertDateToFormat( String dateTo = AppDateUtils.convertDateToFormat(
widget.patientSearchViewModel.selectedToDate, widget.patientSearchViewModel.selectedToDate,
'yyyy-MM-dd'); 'yyyy-MM-dd');
String dateFrom = DateUtils.convertDateToFormat( String dateFrom = AppDateUtils.convertDateToFormat(
widget.patientSearchViewModel.selectedFromDate, widget.patientSearchViewModel.selectedFromDate,
'yyyy-MM-dd'); 'yyyy-MM-dd');

@ -110,7 +110,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CheckboxListTile( /*CheckboxListTile(
title: AppText( title: AppText(
TranslationBase.of(context).inPatient, TranslationBase.of(context).inPatient,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -158,7 +158,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
SizedBox( SizedBox(
height: 16, height: 16,
), ),*/
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
@ -289,7 +289,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
minLines: 1, minLines: 1,
maxLines: 20, maxLines: 20,
), ),
SizedBox( /*SizedBox(
height: 16, height: 16,
), ),
AppText( AppText(
@ -319,11 +319,11 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
controlAffinity: controlAffinity:
ListTileControlAffinity.leading, ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
)), )),*/
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppTextFieldCustom( /* AppTextFieldCustom(
hintText: TranslationBase.of(context).other, hintText: TranslationBase.of(context).other,
dropDownText: TranslationBase.of(context).none, dropDownText: TranslationBase.of(context).none,
enabled: false, enabled: false,
@ -392,7 +392,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
TranslationBase.of(context).backAbdomen, TranslationBase.of(context).backAbdomen,
dropDownText: "BackLNeck", dropDownText: "BackLNeck",
enabled: false, enabled: false,
), ),*/
], ],
), ),
), ),

@ -96,7 +96,7 @@ class _AdmissionRequestDetailScreenState
Helpers.textFieldSelectorDecoration( Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).date, TranslationBase.of(context).date,
selectedDate != null selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null, : null,
true, true,
suffixIcon: Icon( suffixIcon: Icon(

@ -195,7 +195,7 @@ class _AdmissionRequestSecondScreenState
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context)
.expectedAdmissionDate, .expectedAdmissionDate,
dropDownText: _expectedAdmissionDate != null dropDownText: _expectedAdmissionDate != null
? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}" ? "${AppDateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}"
: null, : null,
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,

@ -87,14 +87,14 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
List<TableRow> fullData(ProjectViewModel projectViewModel) { List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
widget.labResult.forEach((vital) { widget.labResult.forEach((vital) {
var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime); var date = AppDateUtils.convertStringToDate(vital.verifiedOnDateTime);
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
'${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}', '${projectViewModel.isArabic? AppDateUtils.getWeekDayArabic(date.weekday): AppDateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? AppDateUtils.getMonthArabic(date.month) : AppDateUtils.getMonth(date.month)} ${date.year}',
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -105,7 +105,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
rotateAngle:-65, rotateAngle:-65,
getTitles: (value) { getTitles: (value) {
print(value); print(value);
DateTime date = DateUtils.convertStringToDate(widget.labResult[value.toInt()].verifiedOnDateTime); DateTime date = AppDateUtils.convertStringToDate(widget.labResult[value.toInt()].verifiedOnDateTime);
if (widget.labResult.length < 8) { if (widget.labResult.length < 8) {
if (widget.labResult.length > value.toInt()) { if (widget.labResult.length > value.toInt()) {
return '${date.day}/ ${date.year}'; return '${date.day}/ ${date.year}';

@ -502,9 +502,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
index] index]
.createdOn != .createdOn !=
null null
? DateUtils ? AppDateUtils.getDayMonthYearDateFormatted(
.getDayMonthYearDateFormatted( AppDateUtils
DateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model model
.patientProgressNoteList[ .patientProgressNoteList[
@ -513,7 +512,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
isArabic: isArabic:
projectViewModel projectViewModel
.isArabic) .isArabic)
: DateUtils : AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime.now(), DateTime.now(),
isArabic: isArabic:
@ -528,13 +527,13 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
index] index]
.createdOn != .createdOn !=
null null
? DateUtils.getHour(DateUtils ? AppDateUtils.getHour(AppDateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model model
.patientProgressNoteList[ .patientProgressNoteList[
index] index]
.createdOn)) .createdOn))
: DateUtils.getHour( : AppDateUtils.getHour(
DateTime.now()), DateTime.now()),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
@ -584,7 +583,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
showMyDialog({BuildContext context, Function confirmFun, String actionName}) { showMyDialog({BuildContext context, Function confirmFun, String actionName}) {
showDialog( showDialog(
context: context, context: context,
child: Center( builder: (ctx) => Center(
child: Container( child: Container(
width: MediaQuery width: MediaQuery
.of(context) .of(context)
@ -678,6 +677,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
), ),
), ),
)); )
);
} }
} }

@ -96,11 +96,11 @@ class _InpatientPrescriptionDetailsScreenState
key: 'UOM'), key: 'UOM'),
buildTableRow( buildTableRow(
des: des:
'${DateUtils.getDate(prescription.startDatetime)}', '${AppDateUtils.getDate(prescription.startDatetime)}',
key: 'Start Date'), key: 'Start Date'),
buildTableRow( buildTableRow(
des: des:
'${DateUtils.getDate(prescription.stopDatetime)}', '${AppDateUtils.getDate(prescription.stopDatetime)}',
key: 'Stop Date'), key: 'Stop Date'),
buildTableRow( buildTableRow(
des: '${prescription.noOfDoses}', des: '${prescription.noOfDoses}',
@ -115,7 +115,7 @@ class _InpatientPrescriptionDetailsScreenState
key: 'Pharmacy Remarks'), key: 'Pharmacy Remarks'),
buildTableRow( buildTableRow(
des: des:
'${DateUtils.getDate(prescription.prescriptionDatetime)}', '${AppDateUtils.getDate(prescription.prescriptionDatetime)}',
key: 'Prescription Date'), key: 'Prescription Date'),
buildTableRow( buildTableRow(
des: '${prescription.refillID}', des: '${prescription.refillID}',

@ -30,10 +30,10 @@ class MyReferralDetailScreen extends StatelessWidget {
return BaseView<PatientReferralViewModel>( return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getPatientDetails( onModelReady: (model) => model.getPatientDetails(
DateUtils.convertStringToDateFormat( AppDateUtils.convertStringToDateFormat(
DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(), DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(),
"yyyy-MM-dd"), "yyyy-MM-dd"),
DateUtils.convertStringToDateFormat( AppDateUtils.convertStringToDateFormat(
DateTime.now().toString(), "yyyy-MM-dd"), DateTime.now().toString(), "yyyy-MM-dd"),
pendingReferral.patientID, pendingReferral.patientID,
pendingReferral.sourceAppointmentNo), pendingReferral.sourceAppointmentNo),

@ -64,8 +64,8 @@ class MyReferralInPatientScreen extends StatelessWidget {
referralStatusCode: model.myReferralPatients[index].referralStatus, referralStatusCode: model.myReferralPatients[index].referralStatus,
patientName: model.myReferralPatients[index].patientName, patientName: model.myReferralPatients[index].patientName,
patientGender: model.myReferralPatients[index].gender, patientGender: model.myReferralPatients[index].gender,
referredDate: DateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate), referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate),
referredTime: DateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), referredTime: AppDateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate),
patientID: "${model.myReferralPatients[index].patientID}", patientID: "${model.myReferralPatients[index].patientID}",
isSameBranch: false, isSameBranch: false,
isReferral: true, isReferral: true,

@ -434,7 +434,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).date, hintText: TranslationBase.of(context).date,
dropDownText: appointmentDate != null dropDownText: appointmentDate != null
? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" ? "${AppDateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}"
: null, : null,
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,

@ -77,9 +77,9 @@ class ReferralPatientDetailScreen extends StatelessWidget {
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"from": DateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat( "to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
@ -105,9 +105,9 @@ class ReferralPatientDetailScreen extends StatelessWidget {
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"from": DateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat( "to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
@ -158,7 +158,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
: Colors.red[700], : Colors.red[700],
), ),
AppText( AppText(
DateUtils.getDayMonthYearDateFormatted( AppDateUtils.getDayMonthYearDateFormatted(
referredPatient.referralDate, referredPatient.referralDate,
), ),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -196,7 +196,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
], ],
), ),
AppText( AppText(
DateUtils.getTimeHHMMA( AppDateUtils.getTimeHHMMA(
referredPatient.referralDate, referredPatient.referralDate,
), ),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -342,7 +342,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.mAXResponseTime, referredPatient.mAXResponseTime,
"dd MMM,yyyy"), "dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',

@ -74,12 +74,12 @@ class ReferredPatientScreen extends StatelessWidget {
"${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
patientGender: patientGender:
model.getReferredPatientItem(index).gender, model.getReferredPatientItem(index).gender,
referredDate: DateUtils.convertDateFromServerFormat( referredDate: AppDateUtils.convertDateFromServerFormat(
model model
.getReferredPatientItem(index) .getReferredPatientItem(index)
.referralDate, .referralDate,
"dd/MM/yyyy"), "dd/MM/yyyy"),
referredTime: DateUtils.convertDateFromServerFormat( referredTime: AppDateUtils.convertDateFromServerFormat(
model model
.getReferredPatientItem(index) .getReferredPatientItem(index)
.referralDate, .referralDate,

@ -76,9 +76,9 @@ class ReferredPatientDetailScreen extends StatelessWidget {
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"from": DateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat( "to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
@ -102,9 +102,9 @@ class ReferredPatientDetailScreen extends StatelessWidget {
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"from": DateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat( "to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'), DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
@ -157,7 +157,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
: Colors.red[700], : Colors.red[700],
), ),
AppText( AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.referralDate, referredPatient.referralDate,
"dd MMM,yyyy"), "dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -194,7 +194,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
], ],
), ),
AppText( AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.referralDate, referredPatient.referralDate,
"hh:mm a"), "hh:mm a"),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -337,7 +337,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
referredPatient.mAXResponseTime, referredPatient.mAXResponseTime,
"dd MMM,yyyy"), "dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',

@ -389,12 +389,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
children: [ children: [
AppText( AppText(
assessment.createdOn != null assessment.createdOn != null
? DateUtils ? AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime.parse( DateTime.parse(
assessment assessment
.createdOn)) .createdOn))
: DateUtils : AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime.now()), DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
@ -402,11 +402,11 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
fontSize: 14, fontSize: 14,
), AppText( ), AppText(
assessment.createdOn != null assessment.createdOn != null
? DateUtils.getHour( ? AppDateUtils.getHour(
DateTime.parse( DateTime.parse(
assessment assessment
.createdOn)) .createdOn))
: DateUtils.getHour( : AppDateUtils.getHour(
DateTime.now()), DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w600, .w600,

@ -169,7 +169,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
], ],
), ),
AppText( AppText(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), widget.patientProgressNote.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w600, .w600,
fontSize: 14, fontSize: 14,
@ -192,7 +192,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
], ],
), ),
AppText( AppText(
widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()), widget.patientProgressNote.createdOn !=null?AppDateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
) )

@ -251,7 +251,7 @@ class VitalSignDetailPainScale extends StatelessWidget {
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Center( child: Center(
child: AppText( child: AppText(
"${DateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}",
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0XFF28353E), color: Color(0XFF28353E),
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,

@ -154,7 +154,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey1]; var data = vital.toJson()[widget.viewKey1];
DateTime elementDate = DateTime elementDate =
DateUtils.getDateTimeFromServerFormat(vital.createdOn); AppDateUtils.getDateTimeFromServerFormat(vital.createdOn);
if (data != 0) if (data != 0)
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
@ -162,7 +162,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}', '${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(elementDate.weekday) : AppDateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(elementDate.month) : AppDateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${AppDateUtils.getHour(elementDate)}',
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -111,7 +111,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey]; var data = vital.toJson()[widget.viewKey];
DateTime elementDate = DateTime elementDate =
DateUtils.getDateTimeFromServerFormat(vital.createdOn); AppDateUtils.getDateTimeFromServerFormat(vital.createdOn);
if (data != 0) if (data != 0)
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
@ -119,7 +119,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}', '${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(elementDate.weekday) : AppDateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(elementDate.month) : AppDateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${AppDateUtils.getHour(elementDate)}',
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -101,7 +101,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
vitalList.reversed.toList().forEach( vitalList.reversed.toList().forEach(
(element) { (element) {
DateTime elementDate = DateTime elementDate =
DateUtils.getDateTimeFromServerFormat(element.createdOn); AppDateUtils.getDateTimeFromServerFormat(element.createdOn);
if (element.toJson()[viewKey] != null && if (element.toJson()[viewKey] != null &&
element.toJson()[viewKey]?.toInt() != 0) element.toJson()[viewKey]?.toInt() != 0)
timeSeriesData.add( timeSeriesData.add(

@ -116,7 +116,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
vitalList.reversed.toList().forEach( vitalList.reversed.toList().forEach(
(element) { (element) {
DateTime elementDate = DateTime elementDate =
DateUtils.getDateTimeFromServerFormat(element.createdOn); AppDateUtils.getDateTimeFromServerFormat(element.createdOn);
if (element.toJson()[viewKey1]?.toInt() != 0) if (element.toJson()[viewKey1]?.toInt() != 0)
timeSeriesData1.add( timeSeriesData1.add(
TimeSeriesSales2( TimeSeriesSales2(

@ -446,85 +446,40 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Row( child: Row(
children: [ children: [
Container( Container(
// height: MediaQuery.of(context) color: Colors.white,
// .size
// .height *
// 0.02,
width: MediaQuery.of(context) width: MediaQuery.of(context)
.size .size
.width * .width *
0.35, 0.35,
child: AppTextFieldCustom( child: TextField(
isPrscription: true, decoration:
inputFormatters: [ textFieldSelectorDecorationStreangrh(
LengthLimitingTextInputFormatter( strengthController
5), .text,
// WhitelistingTextInputFormatter 'Strength', //strengthController.text,
// .digitsOnly false),
], enabled: true,
hintText: controller:
TranslationBase.of( strengthController,
context) onChanged:
.strength, (String value) {
setState(() {
// fontWeight: FontWeight.w500, strengthChar =
// fontSize: 14.0, value.length;
// borderWidth: 0.2, });
if (strengthChar >= 5) {
controller: DrAppToastMsg
strengthController, .showErrorToast(
// keyboardType: TextInputType TranslationBase.of(
// .numberWithOptions( context)
// decimal: true, .only5DigitsAllowedForStrength,
// ), );
onChanged: (String value) { }
setState(() { },
strengthChar = keyboardType: TextInputType
value.length; .numberWithOptions(
}); decimal: true,
if (strengthChar >= 5) { )),
DrAppToastMsg
.showErrorToast(
TranslationBase.of(
context)
.only5DigitsAllowedForStrength,
);
}
},
// onClick: (_) {
// if (_selectedMedication !=
// null &&
// duration != null &&
// frequency != null &&
// strengthController
// .text !=
// null) {
// model.getBoxQuantity(
// freq: frequency[
// 'parameterCode'],
// duration:
// duration['id'],
// itemCode:
// _selectedMedication
// .itemId,
// strength: double.parse(
// strengthController
// .text));
// box = model.boxQuintity;
//
// return;
// }
// },
// validator: (value) {
// if (value.isEmpty &&
// strengthController.text.length >
// 4)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
),
), ),
SizedBox( SizedBox(
width: 5.0, width: 5.0,
@ -925,7 +880,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
context) context)
.date, .date,
selectedDate != null selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null, : null,
true, true,
suffixIcon: Icon( suffixIcon: Icon(
@ -1394,6 +1349,48 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
); );
} }
InputDecoration textFieldSelectorDecorationStreangrh(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
: null,
hintStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
hintText: selectedText == null || selectedText == "" ? hintText : null,
labelText:
selectedText != null && selectedText != "" ? '\n$selectedText' : null,
labelStyle: TextStyle(
fontSize: 15,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
);
}
openDrugToDrug(model) { openDrugToDrug(model) {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,

@ -321,7 +321,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${DateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
@ -337,7 +337,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${DateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,

@ -34,7 +34,7 @@ class PrescriptionItemsPage extends StatelessWidget {
clinic: prescriptions.clinicDescription, clinic: prescriptions.clinicDescription,
branch: prescriptions.name, branch: prescriptions.name,
isPrescriptions: true, isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), appointmentDate: AppDateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
doctorName: prescriptions.doctorName, doctorName: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL, profileUrl: prescriptions.doctorImageURL,
), ),
@ -75,7 +75,7 @@ class PrescriptionItemsPage extends StatelessWidget {
onTap: (){ onTap: (){
showDialog( showDialog(
context: context, context: context,
child: ShowImageDialog( builder: (ctx) => ShowImageDialog(
imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
) )
); );
@ -164,7 +164,7 @@ class PrescriptionItemsPage extends StatelessWidget {
onTap: (){ onTap: (){
showDialog( showDialog(
context: context, context: context,
child: ShowImageDialog( builder: (ctx) => ShowImageDialog(
imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
) )
); );

@ -226,7 +226,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
13.5, 13.5,
), ),
AppText( AppText(
DateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != AppDateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
null null
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
.month) .month)
@ -249,7 +249,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
.green, .green,
), ),
AppText( AppText(
DateUtils.getTimeFormated(DateTime.parse(model AppDateUtils.getTimeFormated(DateTime.parse(model
.prescriptionList[ .prescriptionList[
0] 0]
.entityList[ .entityList[
@ -289,7 +289,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
Expanded( Expanded(
child: child:
AppText( AppText(
DateUtils.getDateFormatted(DateTime.parse(model AppDateUtils.getDateFormatted(DateTime.parse(model
.prescriptionList[0] .prescriptionList[0]
.entityList[index] .entityList[index]
.startDate)), .startDate)),

@ -125,7 +125,7 @@ class _NewPrescriptionHistoryScreenState
13.5, 13.5,
), ),
AppText( AppText(
DateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != AppDateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
null null
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
.month) .month)
@ -148,7 +148,7 @@ class _NewPrescriptionHistoryScreenState
.green, .green,
), ),
AppText( AppText(
DateUtils.getTimeFormated(DateTime.parse(model AppDateUtils.getTimeFormated(DateTime.parse(model
.prescriptionList[ .prescriptionList[
0] 0]
.entityList[ .entityList[
@ -187,7 +187,7 @@ class _NewPrescriptionHistoryScreenState
Expanded( Expanded(
child: child:
AppText( AppText(
DateUtils.getDateFormatted(DateTime.parse(model AppDateUtils.getDateFormatted(DateTime.parse(model
.prescriptionList[0] .prescriptionList[0]
.entityList[index] .entityList[index]
.startDate)), .startDate)),

@ -128,7 +128,7 @@ class PrescriptionsPage extends StatelessWidget {
.clinicDescription, .clinicDescription,
isPrescriptions: true, isPrescriptions: true,
appointmentDate: appointmentDate:
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index] model.prescriptionsList[index]
.appointmentDate, .appointmentDate,
), ),
@ -176,12 +176,12 @@ class PrescriptionsPage extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
startOn: DateUtils startOn: AppDateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model.inPatientPrescription[index] model.inPatientPrescription[index]
.startDatetime, .startDatetime,
), ),
stopOn: DateUtils stopOn: AppDateUtils
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
model.inPatientPrescription[index] model.inPatientPrescription[index]
.stopDatetime, .stopDatetime,
@ -197,7 +197,7 @@ class PrescriptionsPage extends StatelessWidget {
clinic: 'basheer', clinic: 'basheer',
isPrescriptions: true, isPrescriptions: true,
appointmentDate: appointmentDate:
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
model.inPatientPrescription[index] model.inPatientPrescription[index]
.prescriptionDatetime, .prescriptionDatetime,
), ),

@ -665,11 +665,11 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
child: TextField( child: TextField(
decoration: Helpers decoration: Helpers
.textFieldSelectorDecoration( .textFieldSelectorDecoration(
DateUtils.getDateFormatted( AppDateUtils.getDateFormatted(
DateTime.parse( DateTime.parse(
widget.startDate)), widget.startDate)),
selectedDate != null selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null, : null,
true, true,
suffixIcon: Icon( suffixIcon: Icon(

@ -99,13 +99,13 @@ class ProcedureCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
AppText( AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
'${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}', '${AppDateUtils.getHour(AppDateUtils.convertISOStringToDateTime(entityList.orderDate))}',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.grey[700], color: Colors.grey[700],
fontSize: 14, fontSize: 14,

@ -90,7 +90,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
padding: padding:
EdgeInsets.only(top: 10), EdgeInsets.only(top: 10),
child: AppText( child: AppText(
DateUtils AppDateUtils
.convertStringToDateFormat( .convertStringToDateFormat(
item.createdOn, item.createdOn,
'yyyy-MM-dd HH:mm'), 'yyyy-MM-dd HH:mm'),
@ -124,7 +124,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
AppText(TranslationBase.of(context) AppText(TranslationBase.of(context)
.startDate), .startDate),
AppText( AppText(
DateUtils.convertStringToDateFormat( AppDateUtils.convertStringToDateFormat(
item.dateTimeFrom, item.dateTimeFrom,
'yyyy-MM-dd HH:mm'), 'yyyy-MM-dd HH:mm'),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -145,7 +145,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
AppText(TranslationBase.of(context) AppText(TranslationBase.of(context)
.endDate), .endDate),
AppText( AppText(
DateUtils AppDateUtils
.convertStringToDateFormat( .convertStringToDateFormat(
item.dateTimeTo, item.dateTimeTo,
'yyyy-MM-dd HH:mm'), 'yyyy-MM-dd HH:mm'),

@ -18,7 +18,6 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
// ignore: must_be_immutable
class AddSickLeavScreen extends StatelessWidget { class AddSickLeavScreen extends StatelessWidget {
PatiantInformtion patient; PatiantInformtion patient;
@override @override
@ -195,8 +194,8 @@ class AddSickLeavScreen extends StatelessWidget {
), ),
Flexible( Flexible(
child: AppText( child: AppText(
DateUtils.getDayMonthYearDateFormatted( AppDateUtils.getDayMonthYearDateFormatted(
DateUtils AppDateUtils
.convertStringToDate( .convertStringToDate(
item.startDate)), item.startDate)),
fontWeight: fontWeight:
@ -208,16 +207,15 @@ class AddSickLeavScreen extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context)
context)
.endDate + .endDate +
' ', ' ',
), ),
Flexible( Flexible(
child: AppText( child: AppText(
DateUtils AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateUtils AppDateUtils
.convertStringToDate( .convertStringToDate(
item.endDate, item.endDate,
)), )),

@ -117,7 +117,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
), ),
Flexible( Flexible(
child: AppText( child: AppText(
DateUtils AppDateUtils
.convertStringToDateFormat( .convertStringToDateFormat(
item.startDate, item.startDate,
'dd-MMM-yyyy'), 'dd-MMM-yyyy'),

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class DateUtils { class AppDateUtils {
static String convertDateToFormat(DateTime dateTime, String dateFormat) { static String convertDateToFormat(DateTime dateTime, String dateFormat) {
return DateFormat(dateFormat).format(dateTime); return DateFormat(dateFormat).format(dateTime);
} }
@ -307,7 +307,7 @@ class DateUtils {
static String getAgeByBirthday(dynamic birthday, BuildContext context) { static String getAgeByBirthday(dynamic birthday, BuildContext context) {
// https://leechy.dev/calculate-dates-diff-in-dart // https://leechy.dev/calculate-dates-diff-in-dart
DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday); DateTime birthDate = AppDateUtils.getDateTimeFromServerFormat(birthday);
final now = DateTime.now(); final now = DateTime.now();
int years = now.year - birthDate.year; int years = now.year - birthDate.year;
int months = now.month - birthDate.month; int months = now.month - birthDate.month;

@ -183,13 +183,13 @@ class _VerificationMethodsState extends State<VerificationMethods> {
child: ListTile( child: ListTile(
title: AppText( title: AppText(
user.editedOn != null user.editedOn != null
? getDate(DateUtils ? getDate(AppDateUtils
.convertStringToDate( .convertStringToDate(
user user
.editedOn)) .editedOn))
: user.createdOn != : user.createdOn !=
null null
? getDate(DateUtils ? getDate(AppDateUtils
.convertStringToDate( .convertStringToDate(
user.createdOn)) user.createdOn))
: '--', : '--',
@ -201,13 +201,13 @@ class _VerificationMethodsState extends State<VerificationMethods> {
), ),
subtitle: AppText( subtitle: AppText(
user.editedOn != null user.editedOn != null
? getTime(DateUtils ? getTime(AppDateUtils
.convertStringToDate( .convertStringToDate(
user user
.editedOn)) .editedOn))
: user.createdOn != : user.createdOn !=
null null
? getTime(DateUtils ? getTime(AppDateUtils
.convertStringToDate( .convertStringToDate(
user.createdOn)) user.createdOn))
: '--', : '--',

@ -66,19 +66,19 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.day .day
.toString() + .toString() +
" " + " " +
DateUtils.getMonth( AppDateUtils.getMonth(
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.month) .month)
.toString() .toString()
.substring(0, 3) + .substring(0, 3) +
' ' + ' ' +
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.year .year
.toString(), .toString(),
@ -86,12 +86,12 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
AppText( AppText(
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.hour .hour
.toString() .toString()
+ ":"+ + ":"+
DateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.minute .minute
.toString(), .toString(),
@ -216,7 +216,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
style: TextStyle(fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold)), style: TextStyle(fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15)), fontSize: 15)),

@ -33,13 +33,13 @@ class MyScheduleWidget extends StatelessWidget {
height: 10, height: 10,
), ),
AppText( AppText(
projectViewModel.isArabic?DateUtils.getWeekDayArabic(workingHoursTable.date.weekday): DateUtils.getWeekDay(workingHoursTable.date.weekday) , projectViewModel.isArabic?AppDateUtils.getWeekDayArabic(workingHoursTable.date.weekday): AppDateUtils.getWeekDay(workingHoursTable.date.weekday) ,
fontSize: 16, fontSize: 16,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
AppText( AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', ' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -51,7 +51,7 @@ class MyScheduleWidget extends StatelessWidget {
Container( Container(
width: MediaQuery.of(context).size.width * 0.55, width: MediaQuery.of(context).size.width * 0.55,
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: DateUtils.isToday(workingHoursTable.date) bgColor: AppDateUtils.isToday(workingHoursTable.date)
? Colors.green[500] ? Colors.green[500]
: Colors.transparent, : Colors.transparent,
// hasBorder: false, // hasBorder: false,
@ -59,7 +59,7 @@ class MyScheduleWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (DateUtils.isToday(workingHoursTable.date)) if (AppDateUtils.isToday(workingHoursTable.date))
AppText( AppText(
"Today", "Today",
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,

@ -134,8 +134,8 @@ class PatientCard extends StatelessWidget {
) )
: patientInfo.arrivedOn != null : patientInfo.arrivedOn != null
? AppText( ? AppText(
DateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.arrivedOn,) AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(patientInfo.arrivedOn,)
)+" "+ "${DateUtils.getStartTime(patientInfo.startTime)}", )+" "+ "${AppDateUtils.getStartTime(patientInfo.startTime)}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 15, fontSize: 15,
@ -143,7 +143,7 @@ class PatientCard extends StatelessWidget {
: (patientInfo.appointmentDate != null && patientInfo.appointmentDate.isNotEmpty)? : (patientInfo.appointmentDate != null && patientInfo.appointmentDate.isNotEmpty)?
AppText( AppText(
"${DateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.appointmentDate,))} ${DateUtils.getStartTime(patientInfo.startTime)}", "${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(patientInfo.appointmentDate,))} ${AppDateUtils.getStartTime(patientInfo.startTime)}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 15, fontSize: 15,
@ -299,7 +299,7 @@ class PatientCard extends StatelessWidget {
style: TextStyle(fontSize: 12)), style: TextStyle(fontSize: 12)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 13)), fontSize: 13)),
@ -328,7 +328,7 @@ class PatientCard extends StatelessWidget {
new TextSpan( new TextSpan(
text: patientInfo.admissionDate == null text: patientInfo.admissionDate == null
? "" ? ""
: "${DateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 13)), fontSize: 13)),
@ -348,7 +348,7 @@ class PatientCard extends StatelessWidget {
text: TranslationBase.of(context).numOfDays + " : ", text: TranslationBase.of(context).numOfDays + " : ",
style: TextStyle(fontSize: 12)), style: TextStyle(fontSize: 12)),
new TextSpan( new TextSpan(
text: "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", text: "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 13)), fontSize: 13)),

@ -119,10 +119,10 @@ class PatientProfileButton extends StatelessWidget {
if (route == null) return; if (route == null) return;
if (from == null) { if (from == null) {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); from = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if (to == null) { if (to == null) {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if (arrivalType == null) { if (arrivalType == null) {
arrivalType = "0"; arrivalType = "0";

@ -141,7 +141,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
) )
: AppText( : AppText(
patient.arrivedOn != null patient.arrivedOn != null
? DateUtils.convertStringToDateFormat( ? AppDateUtils.convertStringToDateFormat(
patient.arrivedOn, patient.arrivedOn,
'MM-dd-yyyy HH:mm') 'MM-dd-yyyy HH:mm')
: '', : '',
@ -260,7 +260,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth??"" : patient.dateofBirth??"", context)}", "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth??"" : patient.dateofBirth??"", context)}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 14)), fontWeight: FontWeight.w700, fontSize: 14)),
], ],
@ -291,7 +291,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
new TextSpan( new TextSpan(
text: patient.admissionDate == null text: patient.admissionDate == null
? "" ? ""
: "${DateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15)), fontSize: 15)),
@ -305,12 +305,12 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
if(isDischargedPatient && patient.dischargeDate!=null) if(isDischargedPatient && patient.dischargeDate!=null)
AppText( AppText(
"${DateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w700) fontWeight: FontWeight.w700)
else else
AppText( AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w700), fontWeight: FontWeight.w700),
], ],

@ -140,7 +140,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
: AppText( : AppText(
DateUtils.getDayMonthYearDateFormatted(DateUtils.convertStringToDate(patient.arrivedOn)), AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(patient.arrivedOn)),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
@ -259,7 +259,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ?? "" : patient.dateofBirth ?? "", context)}", "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ?? "" : patient.dateofBirth ?? "", context)}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 14)), fontWeight: FontWeight.w700, fontSize: 14)),
], ],

@ -125,7 +125,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
patient.admissionDate, "hh:mm a"), patient.admissionDate, "hh:mm a"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 1.4 * SizeConfig.textMultiplier, fontSize: 1.4 * SizeConfig.textMultiplier,
@ -145,7 +145,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
fontSize: 1.2 * SizeConfig.textMultiplier, fontSize: 1.2 * SizeConfig.textMultiplier,
), ),
AppText( AppText(
DateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(
patient.admissionDate, "dd MMM,yyyy"), patient.admissionDate, "dd MMM,yyyy"),
fontSize: 1.4 * SizeConfig.textMultiplier, fontSize: 1.4 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700), fontWeight: FontWeight.w700),
@ -187,7 +187,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
fontSize: 1.2 * SizeConfig.textMultiplier, fontSize: 1.2 * SizeConfig.textMultiplier,
), ),
AppText( AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 1.4 * SizeConfig.textMultiplier, fontSize: 1.4 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700), fontWeight: FontWeight.w700),
], ],

@ -174,7 +174,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
FontWeight.w600, FontWeight.w600,
) )
: AppText( : AppText(
DateUtils.convertStringToDateFormat( AppDateUtils.convertStringToDateFormat(
patient patient
.arrivedOn, .arrivedOn,
'MM-dd-yyyy HH:mm'), 'MM-dd-yyyy HH:mm'),
@ -334,7 +334,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ??"": patient.dateofBirth??"", context)}", "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ??"": patient.dateofBirth??"", context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,
@ -446,7 +446,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
), ),
) )
], ],

@ -164,7 +164,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
: AppText( : AppText(
DateUtils.convertStringToDateFormat( AppDateUtils.convertStringToDateFormat(
patient.arrivedOn, patient.arrivedOn,
'MM-dd-yyyy HH:mm'), 'MM-dd-yyyy HH:mm'),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -284,7 +284,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 14)), fontWeight: FontWeight.w700, fontSize: 14)),
], ],
@ -408,7 +408,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
), ),
), ),
AppText( AppText(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
fontSize: 14, fontSize: 14,
) )
], ],

@ -90,7 +90,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: AppText( child: AppText(
'${DateUtils.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtils.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', '${AppDateUtils.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${AppDateUtils.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),

@ -68,14 +68,14 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if (!isPrescriptions&& isShowTime) if (!isPrescriptions&& isShowTime)
AppText( AppText(
'${DateUtils.getHour(appointmentDate)}', '${AppDateUtils.getHour(appointmentDate)}',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.grey[700], color: Colors.grey[700],
fontSize: 14, fontSize: 14,

@ -5,7 +5,7 @@ import 'gif_loader_container.dart';
class GifLoaderDialogUtils { class GifLoaderDialogUtils {
static showMyDialog(BuildContext context) { static showMyDialog(BuildContext context) {
showDialog(context: context, child: GifLoaderContainer()); showDialog(context: context, builder: (ctx) => GifLoaderContainer());
} }
static hideDialog(BuildContext context) { static hideDialog(BuildContext context) {

@ -63,14 +63,14 @@ class InPatientDoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if (!isPrescriptions) if (!isPrescriptions)
AppText( AppText(
'${DateUtils.getHour(appointmentDate)}', '${AppDateUtils.getHour(appointmentDate)}',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.grey[700], color: Colors.grey[700],
fontSize: 14, fontSize: 14,

@ -573,7 +573,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3-nullsafety.1" version: "0.6.2"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:

@ -16,6 +16,11 @@ version: 1.2.2+2
environment: environment:
sdk: ">=2.8.0 <3.0.0" sdk: ">=2.8.0 <3.0.0"
#dependency_overrides:
# intl: 0.17.0-nullsafety.2
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter

Loading…
Cancel
Save