Merge pull request #246 from yaso-meth/QOL--Hide-Patient-ID-no
hide id shoiw name
This commit is contained in:
@@ -193,19 +193,16 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
accessStatus = result;
|
accessStatus = result;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// print(accessStatus);
|
|
||||||
// print(hasAccess);
|
|
||||||
var firstLetterFName = widget.patients[index].first_name[0];
|
|
||||||
var firstLetterLName = widget.patients[index].last_name[0];
|
|
||||||
var fnameStar = '*' * 8;
|
|
||||||
var lnameStar = '*' * 8;
|
|
||||||
if (accessStatus == "") {
|
if (accessStatus == "") {
|
||||||
accessStatus = "No Access";
|
accessStatus = "No Access";
|
||||||
}
|
}
|
||||||
|
var idStars = '*' * (13 - 6);
|
||||||
|
String startedOutPatientIdNo =
|
||||||
|
"${widget.patients[index].id_no.substring(0, 6)}$idStars";
|
||||||
setState(() {
|
setState(() {
|
||||||
idController.text = widget.patients[index].id_no;
|
idController.text = startedOutPatientIdNo;
|
||||||
fnameController.text = firstLetterFName + fnameStar;
|
fnameController.text = widget.patients[index].first_name;
|
||||||
lnameController.text = firstLetterLName + lnameStar;
|
lnameController.text = widget.patients[index].last_name;
|
||||||
accessStatusController.text = accessStatus.toUpperCase();
|
accessStatusController.text = accessStatus.toUpperCase();
|
||||||
});
|
});
|
||||||
//print(accessStatus);
|
//print(accessStatus);
|
||||||
@@ -476,17 +473,18 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
|
|
||||||
Widget isMainMember(int index) {
|
Widget isMainMember(int index) {
|
||||||
//var matchRE = RegExp(r'^[a-z]+$');
|
//var matchRE = RegExp(r'^[a-z]+$');
|
||||||
var firstLetterFName = widget.patients[index].first_name[0];
|
// var firstLetterFName = widget.patients[index].first_name[0];
|
||||||
var firstLetterLName = widget.patients[index].last_name[0];
|
// var firstLetterLName = widget.patients[index].last_name[0];
|
||||||
var fnameStar = '*' * 8;
|
// var fnameStar = '*' * 8;
|
||||||
var lnameStar = '*' * 8;
|
// var lnameStar = '*' * 8;
|
||||||
|
|
||||||
if (widget.patients[index].medical_aid_main_member == "Yes") {
|
if (widget.patients[index].medical_aid_main_member == "Yes") {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"$firstLetterFName$fnameStar $firstLetterLName$lnameStar",
|
// "$firstLetterFName$fnameStar $firstLetterLName$lnameStar",
|
||||||
|
"${widget.patients[index].first_name} ${widget.patients[index].last_name}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
@@ -502,7 +500,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Text(
|
return Text(
|
||||||
"$firstLetterFName$fnameStar $firstLetterLName$lnameStar",
|
// "$firstLetterFName$fnameStar $firstLetterLName$lnameStar",
|
||||||
|
"${widget.patients[index].first_name} ${widget.patients[index].last_name}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
@@ -512,11 +511,14 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
|
|
||||||
Widget hasMedicalAid(int index) {
|
Widget hasMedicalAid(int index) {
|
||||||
var medAidNoStar = '*' * 8;
|
var medAidNoStar = '*' * 8;
|
||||||
|
var idStars = '*' * (13 - 6);
|
||||||
|
String startedOutPatientIdNo =
|
||||||
|
"${widget.patients[index].id_no.substring(0, 6)}$idStars";
|
||||||
if (widget.patients[index].medical_aid == "Yes") {
|
if (widget.patients[index].medical_aid == "Yes") {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: isMainMember(index),
|
title: isMainMember(index),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
"ID No.: ${widget.patients[index].id_no}\nMedical Aid No.: $medAidNoStar",
|
"ID No.: $startedOutPatientIdNo\nMedical Aid No.: $medAidNoStar",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
@@ -540,7 +542,7 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
title: isMainMember(index),
|
title: isMainMember(index),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
"ID No.: ${widget.patients[index].id_no}\nMedical Aid No.: $medAidNoStar",
|
"ID No.: $startedOutPatientIdNo\nMedical Aid No.: $medAidNoStar",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user