progress note

merge-requests/79/head
unknown 4 years ago
parent 7f5831335b
commit 9f4802c225

@ -3,7 +3,7 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z]";
const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://uat.hmgwebservices.com/Services/';
const BASE_URL = 'https://hmgwebservices.com/Services/';
const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient";
@ -50,7 +50,7 @@ var SERVICES_PATIANT_HEADER = [
//******************
// Colors ////// by : ibrahim
const PRIMARY_COLOR = 0xff58434F;
const PRIMARY_COLOR = 0xf5f5f5;
const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;

@ -318,7 +318,7 @@ class PatientsProvider with ChangeNotifier {
getPatientInsuranceApprovals(patient) async{
//setBasicData();
setBasicData();
try {
if (await Helpers.checkConnection()) {
final response =await AppClient.post(PATIENT_INSURANCE_APPROVALS_URL, body: json.encode(patient));

@ -1,7 +1,9 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../../config/shared_pref_kay.dart';
@ -30,6 +32,9 @@ class ProgressNoteScreen extends StatefulWidget {
class _ProgressNoteState extends State<ProgressNoteScreen> {
PatientsProvider patientsProv;
var notesList;
var filteredNotesList;
final _controller = TextEditingController();
var _isInit = true;
/*
@ -62,6 +67,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
if (_isInit) {
patientsProv = Provider.of<PatientsProvider>(context);
getProgressNoteList(context);
notesList = patientsProv.patientProgressNoteList;
}
_isInit = false;
}
@ -76,60 +82,109 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
? DrAppCircularProgressIndeicator()
: patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.patientProgressNoteList.length == 0
: notesList == null
? DrAppEmbeddedError(
error: 'You don\'t have any Progress Note')
: Container(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder(
itemCount:
patientsProv.patientProgressNoteList.length,
itemBuilder: (BuildContext ctxt, int index) {
return RoundedContainer(
backgroundColor: Colors.yellow[200],
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
patientsProv
.patientProgressNoteList[index]
["DoctorName"],
marginTop: 10,
marginLeft: 10,
marginBottom: 5,
fontWeight: FontWeight.bold,
),
AppText(
convertDateFormat(patientsProv
.patientProgressNoteList[index]
["AssessmentDate"]),
marginLeft: 10,
color: Colors.grey[600],
),
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
AppText(
patientsProv
.patientProgressNoteList[index]
["Notes"],
margin: 10,
)
],
));
}),
),
: Column(
children: <Widget>[
Container(
width: SizeConfig.screenWidth * 0.80,
margin: EdgeInsets.all(20),
child: TextField(
controller: _controller,
onChanged: (String str) {
this.searchData(str);
},
decoration: buildInputDecoration(
context, 'Search Patient'),
),
),
Expanded(
child: Container(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder(
itemCount:
notesList.length,
itemBuilder: (BuildContext ctxt, int index) {
return RoundedContainer(
backgroundColor: Colors.yellow[200],
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
notesList[index]
["DoctorName"],
marginTop: 10,
marginLeft: 10,
marginBottom: 5,
fontWeight: FontWeight.bold,
),
AppText(
convertDateFormat(notesList[index]
["AssessmentDate"]),
marginLeft: 10,
color: Colors.grey[600],
),
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
AppText(
notesList[index]
["Notes"],
margin: 10,
)
],
));
}),
),
),
],
),
);
}
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon: Icon(Icons.search, color:Colors.black),
filled: true,
fillColor: Colors.white,
hintText: hint,
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(20)),
borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(50.0)),
borderSide: BorderSide(color: Colors.grey), //),
));
}
searchData(String str) {
var strExist = str.length > 0 ? true : false;
if(strExist){
filteredNotesList = null;
filteredNotesList = notesList.where((note) => note["DoctorName"].toString().contains(str.toUpperCase())).toList();
setState(() {
notesList = filteredNotesList;
});
}else{
setState(() {
notesList = patientsProv.patientProgressNoteList;
});
}
}
convertDateFormat(String str) {
const start = "/Date(";
const end = "+0300)";

Loading…
Cancel
Save