Inpatient medical instructions implemented
parent
786dd76f57
commit
d251ca0e1c
@ -0,0 +1,85 @@
|
|||||||
|
class GetMedicalInstructions {
|
||||||
|
dynamic propertyChanged;
|
||||||
|
int admissionRequestNoField;
|
||||||
|
String clinicNameField;
|
||||||
|
String doctorNameField;
|
||||||
|
String expectedAdmissionDateField;
|
||||||
|
List<MedicaLInstructionsField> medicaLInstructionsField;
|
||||||
|
dynamic medicalInstructionsXMLField;
|
||||||
|
String medicalRemarksField;
|
||||||
|
int projectIdField;
|
||||||
|
String projectNameField;
|
||||||
|
String setupIdField;
|
||||||
|
|
||||||
|
GetMedicalInstructions(
|
||||||
|
{this.propertyChanged,
|
||||||
|
this.admissionRequestNoField,
|
||||||
|
this.clinicNameField,
|
||||||
|
this.doctorNameField,
|
||||||
|
this.expectedAdmissionDateField,
|
||||||
|
this.medicaLInstructionsField,
|
||||||
|
this.medicalInstructionsXMLField,
|
||||||
|
this.medicalRemarksField,
|
||||||
|
this.projectIdField,
|
||||||
|
this.projectNameField,
|
||||||
|
this.setupIdField});
|
||||||
|
|
||||||
|
GetMedicalInstructions.fromJson(Map<String, dynamic> json) {
|
||||||
|
propertyChanged = json['PropertyChanged'];
|
||||||
|
admissionRequestNoField = json['admissionRequestNoField'];
|
||||||
|
clinicNameField = json['clinicNameField'];
|
||||||
|
doctorNameField = json['doctorNameField'];
|
||||||
|
expectedAdmissionDateField = json['expectedAdmissionDateField'];
|
||||||
|
if (json['medicaLInstructionsField'] != null) {
|
||||||
|
medicaLInstructionsField = <MedicaLInstructionsField>[];
|
||||||
|
json['medicaLInstructionsField'].forEach((v) {
|
||||||
|
medicaLInstructionsField.add(new MedicaLInstructionsField.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
medicalInstructionsXMLField = json['medicalInstructionsXMLField'];
|
||||||
|
medicalRemarksField = json['medicalRemarksField'];
|
||||||
|
projectIdField = json['projectIdField'];
|
||||||
|
projectNameField = json['projectNameField'];
|
||||||
|
setupIdField = json['setupIdField'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PropertyChanged'] = this.propertyChanged;
|
||||||
|
data['admissionRequestNoField'] = this.admissionRequestNoField;
|
||||||
|
data['clinicNameField'] = this.clinicNameField;
|
||||||
|
data['doctorNameField'] = this.doctorNameField;
|
||||||
|
data['expectedAdmissionDateField'] = this.expectedAdmissionDateField;
|
||||||
|
if (this.medicaLInstructionsField != null) {
|
||||||
|
data['medicaLInstructionsField'] = this.medicaLInstructionsField.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['medicalInstructionsXMLField'] = this.medicalInstructionsXMLField;
|
||||||
|
data['medicalRemarksField'] = this.medicalRemarksField;
|
||||||
|
data['projectIdField'] = this.projectIdField;
|
||||||
|
data['projectNameField'] = this.projectNameField;
|
||||||
|
data['setupIdField'] = this.setupIdField;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MedicaLInstructionsField {
|
||||||
|
Null propertyChanged;
|
||||||
|
String descriptionField;
|
||||||
|
int parameterCodeField;
|
||||||
|
|
||||||
|
MedicaLInstructionsField({this.propertyChanged, this.descriptionField, this.parameterCodeField});
|
||||||
|
|
||||||
|
MedicaLInstructionsField.fromJson(Map<String, dynamic> json) {
|
||||||
|
propertyChanged = json['PropertyChanged'];
|
||||||
|
descriptionField = json['descriptionField'];
|
||||||
|
parameterCodeField = json['parameterCodeField'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PropertyChanged'] = this.propertyChanged;
|
||||||
|
data['descriptionField'] = this.descriptionField;
|
||||||
|
data['parameterCodeField'] = this.parameterCodeField;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../models/InPatientServices/get_medical_instructions_response_model.dart';
|
||||||
|
|
||||||
|
class MedicalInstructionsPage extends StatefulWidget {
|
||||||
|
List<GetMedicalInstructions> getMedicalInstructionsList;
|
||||||
|
|
||||||
|
MedicalInstructionsPage({@required this.getMedicalInstructionsList});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MedicalInstructionsPage> createState() => _MedicalInstructionsPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
|
||||||
|
ProjectViewModel projectViewModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
projectViewModel = Provider.of(context);
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
isShowDecPage: false,
|
||||||
|
showNewAppBarTitle: true,
|
||||||
|
showNewAppBar: true,
|
||||||
|
appBarTitle: TranslationBase.of(context).InPatientServicesHeader,
|
||||||
|
body: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(21.0),
|
||||||
|
child: Text("Medical Instructions",
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 21.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(0xff2B353E),
|
||||||
|
letterSpacing: -0.64,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
child: Card(
|
||||||
|
elevation: 0.0,
|
||||||
|
margin: EdgeInsets.all(16),
|
||||||
|
color: Colors.white,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
side: BorderSide(color: Colors.transparent, width: 0.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(16.0),
|
||||||
|
child: Container(
|
||||||
|
child: ListView.separated(
|
||||||
|
itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField.length,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return Container(
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.75,
|
||||||
|
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
||||||
|
child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField[index].descriptionField,
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(0xff2B353E),
|
||||||
|
letterSpacing: -0.64,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
},
|
||||||
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 14, right: 14),
|
||||||
|
child: mHeight(16.0),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue