|
|
|
@ -1,7 +1,10 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/PatientMuseViewModel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
@ -13,7 +16,8 @@ class ECGPage extends StatelessWidget {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
|
|
|
|
|
String patientType = routeArgs['patient-type'];
|
|
|
|
|
String arrivalType = routeArgs['arrival-type'];
|
|
|
|
|
return BaseView<PatientMuseViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getECGPatient(
|
|
|
|
|
patientType: patient.patientType,
|
|
|
|
@ -21,28 +25,96 @@ class ECGPage extends StatelessWidget {
|
|
|
|
|
patientID: patient.patientId),
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: 'ECG',
|
|
|
|
|
body: ListView.builder(
|
|
|
|
|
itemCount: model.patientMuseResultsModelList.length,
|
|
|
|
|
itemBuilder: (context, index) => InkWell(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
backgroundColor: Color(0xffF8F8F8),
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType),
|
|
|
|
|
SizedBox(height: 12,),
|
|
|
|
|
Texts('Service',style: "caption2",color: Colors.black,),
|
|
|
|
|
Texts('ECG',bold: true,fontSize: 22,),
|
|
|
|
|
SizedBox(height: 12,),
|
|
|
|
|
...List.generate(model.patientMuseResultsModelList.length, (index) => InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
await launch(
|
|
|
|
|
model.patientMuseResultsModelList[index].imageURL);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
height: 90,
|
|
|
|
|
margin: EdgeInsets.only(top: 5,bottom: 5),
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(color: Colors.grey,width: 2)
|
|
|
|
|
border: Border.all(color: Colors.white,width: 2),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(8)
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(
|
|
|
|
|
"${model.patientMuseResultsModelList[index].createdOnDateTime}"),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts('ECG Report',bold: true,fontSize: 14,),
|
|
|
|
|
RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 1.6 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
children: <TextSpan>[
|
|
|
|
|
new TextSpan(
|
|
|
|
|
text:
|
|
|
|
|
TranslationBase.of(context).orderNo,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontFamily:
|
|
|
|
|
'Poppins')),
|
|
|
|
|
new TextSpan(
|
|
|
|
|
text: '${model.patientMuseResultsModelList[index].orderNo?? ''}',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w700,
|
|
|
|
|
fontFamily:
|
|
|
|
|
'Poppins',
|
|
|
|
|
fontSize: 14)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Texts('${DateUtils.getMonthDayYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime)}',color: Colors.black,),
|
|
|
|
|
Texts('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Align(
|
|
|
|
|
alignment: Alignment.topRight,
|
|
|
|
|
child: Icon(Icons.arrow_circle_up_rounded),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|