You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
402 lines
12 KiB
Dart
402 lines
12 KiB
Dart
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.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/helpers.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
class UcafDetailScreen extends StatefulWidget {
|
|
@override
|
|
_UcafDetailScreenState createState() => _UcafDetailScreenState();
|
|
}
|
|
|
|
class _UcafDetailScreenState extends State<UcafDetailScreen> {
|
|
int _activeTap = 0;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
return BaseView<UcafViewModel>(
|
|
builder: (_, model, w) => AppScaffold(
|
|
baseViewModel: model,
|
|
appBarTitle: TranslationBase.of(context).ucaf,
|
|
body: Container(
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
PatientHeaderWidgetNoAvatar(patient),
|
|
SizedBox(
|
|
height: 10,
|
|
),
|
|
Container(
|
|
margin:
|
|
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
|
child: Column(
|
|
children: [
|
|
treatmentStepsBar(context, screenSize),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
...getSelectedTreatmentStepItem(context),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
));
|
|
}
|
|
|
|
Widget treatmentStepsBar(BuildContext _context, Size screenSize) {
|
|
List<String> __treatmentSteps = [
|
|
TranslationBase.of(context).diagnosis.toUpperCase(),
|
|
TranslationBase.of(context).medications.toUpperCase(),
|
|
TranslationBase.of(context).procedures.toUpperCase(),
|
|
];
|
|
return Container(
|
|
height: screenSize.height * 0.070,
|
|
decoration: Helpers.containerBorderDecoration(
|
|
Color(0Xffffffff), Color(0xFFCCCCCC)),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: __treatmentSteps.map((item) {
|
|
bool _isActive = __treatmentSteps[_activeTap] == item ? true : false;
|
|
return Expanded(
|
|
child: InkWell(
|
|
child: Center(
|
|
child: Container(
|
|
height: screenSize.height * 0.070,
|
|
decoration: Helpers.containerBorderDecoration(
|
|
_isActive ? HexColor("#B8382B") : Colors.white,
|
|
_isActive ? HexColor("#B8382B") : Colors.white),
|
|
child: Center(
|
|
child: Text(
|
|
item,
|
|
style: TextStyle(
|
|
fontSize: 12,
|
|
color: _isActive
|
|
? Colors.white
|
|
: Colors.black, //Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
)),
|
|
),
|
|
onTap: () {
|
|
print(__treatmentSteps.indexOf(item));
|
|
setState(() {
|
|
_activeTap = __treatmentSteps.indexOf(item);
|
|
});
|
|
},
|
|
),
|
|
);
|
|
}).toList(),
|
|
),
|
|
);
|
|
}
|
|
|
|
List<Widget> getSelectedTreatmentStepItem(BuildContext _context) {
|
|
switch (_activeTap) {
|
|
case 0:
|
|
return [...List.generate(2, (index) => DiagnosisWidget()).toList()];
|
|
case 1:
|
|
return [...List.generate(2, (index) => MedicationWidget()).toList()];
|
|
case 2:
|
|
return [...List.generate(2, (index) => ProceduresWidget()).toList()];
|
|
default:
|
|
return [
|
|
Container(),
|
|
];
|
|
}
|
|
}
|
|
}
|
|
|
|
class DiagnosisWidget extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).diagnoseType}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"Preliminary Diagnosis",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: AppText(
|
|
"B34.2 | CORONA VIRUS INFECTION, UNSPECIFIED SITE",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).condition}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"174.00 Same",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
const Divider(
|
|
color: Color(0xffCCCCCC),
|
|
height: 1,
|
|
thickness: 1,
|
|
indent: 0,
|
|
endIndent: 0,
|
|
),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
class MedicationWidget extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).id}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"6",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
SizedBox(
|
|
width: 16,
|
|
),
|
|
AppText(
|
|
"${TranslationBase.of(context).price}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"35.6",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
SizedBox(
|
|
width: 16,
|
|
),
|
|
AppText(
|
|
"${TranslationBase.of(context).quantity}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"3",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: AppText(
|
|
"EVE SKIN CREAM WITH HONEY -170GM",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: AppText(
|
|
"Every other day for 5 days",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
const Divider(
|
|
color: Color(0xffCCCCCC),
|
|
height: 1,
|
|
thickness: 1,
|
|
indent: 0,
|
|
endIndent: 0,
|
|
),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
class ProceduresWidget extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).codeNo}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"019054846",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
Expanded(
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).quantity}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"1",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: AppText(
|
|
"SCAN - RENAL MASS PROTOCOL",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).covered}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"Yes",
|
|
fontWeight: FontWeight.normal,
|
|
color: Colors.green,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
SizedBox(
|
|
width: 16,
|
|
),
|
|
AppText(
|
|
"${TranslationBase.of(context).approvalRequired}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"Yes",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 4,
|
|
),
|
|
Row(
|
|
children: [
|
|
AppText(
|
|
"${TranslationBase.of(context).uncoveredByDoctor}: ",
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
AppText(
|
|
"Yes",
|
|
fontWeight: FontWeight.normal,
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
const Divider(
|
|
color: Color(0xffCCCCCC),
|
|
height: 1,
|
|
thickness: 1,
|
|
indent: 0,
|
|
endIndent: 0,
|
|
),
|
|
SizedBox(
|
|
height: 16,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|