Merge branch 'master' into dev_aamir
# Conflicts: # lib/presentation/profile_settings/profile_settings.dartpull/166/head
commit
2bbfe1f131
@ -0,0 +1,3 @@
|
||||
<svg width="15" height="23" viewBox="0 0 15 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.32806 22.32C7.33606 22.32 6.34406 22.2 5.35206 21.96C4.37606 21.736 3.48006 21.36 2.66406 20.832C1.86406 20.304 1.21606 19.616 0.720063 18.768C0.240063 17.92 6.25104e-05 16.88 6.25104e-05 15.648C6.25104e-05 14.4 0.248063 13.248 0.744063 12.192C1.25606 11.12 1.96806 10.168 2.88006 9.336C3.80806 8.488 4.90406 7.784 6.16806 7.224C7.43206 6.664 8.81606 6.264 10.3201 6.024L10.9921 8.688C9.68006 8.928 8.51206 9.256 7.48806 9.672C6.48006 10.088 5.62406 10.584 4.92006 11.16C4.23206 11.736 3.71206 12.368 3.36006 13.056C3.00806 13.76 2.83206 14.512 2.83206 15.312C2.83206 15.952 2.94406 16.504 3.16806 16.968C3.40806 17.448 3.72006 17.848 4.10406 18.168C4.48806 18.488 4.92006 18.744 5.40006 18.936C5.88006 19.128 6.37606 19.264 6.88806 19.344C7.40006 19.44 7.88006 19.488 8.32806 19.488C9.33606 19.488 10.3041 19.392 11.2321 19.2C12.1601 19.024 12.9841 18.784 13.7041 18.48L14.5201 21.024C14.1361 21.216 13.6081 21.408 12.9361 21.6C12.2641 21.808 11.5281 21.976 10.7281 22.104C9.92806 22.248 9.12806 22.32 8.32806 22.32ZM3.86406 9.24C3.27206 9.048 2.72806 8.744 2.23206 8.328C1.75206 7.912 1.36806 7.4 1.08006 6.792C0.792063 6.184 0.648063 5.512 0.648063 4.776C0.648063 3.768 0.904063 2.912 1.41606 2.208C1.92806 1.488 2.59206 0.943998 3.40806 0.575998C4.24006 0.191998 5.13606 -1.90735e-06 6.09606 -1.90735e-06C6.56006 -1.90735e-06 7.00806 0.0319982 7.44006 0.0959983C7.87206 0.159998 8.30406 0.255998 8.73606 0.383997L8.25606 3.072C7.92006 2.992 7.57606 2.928 7.22406 2.88C6.87206 2.832 6.56006 2.808 6.28806 2.808C5.72806 2.808 5.23206 2.896 4.80006 3.072C4.38406 3.248 4.05606 3.496 3.81606 3.816C3.59206 4.136 3.48006 4.512 3.48006 4.944C3.48006 5.312 3.58406 5.656 3.79206 5.976C4.01606 6.28 4.29606 6.544 4.63206 6.768C4.98406 6.992 5.35206 7.168 5.73606 7.296C6.13606 7.424 6.50406 7.496 6.84006 7.512L3.86406 9.24Z" fill="#2B353E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="22" viewBox="0 0 24 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7" cy="7" r="7" fill="#0B85F7" fill-opacity="0.75"/>
|
||||
<circle cx="17" cy="7" r="7" fill="#18C273" fill-opacity="0.75"/>
|
||||
<circle cx="12" cy="15" r="7" fill="#ED1C2B" fill-opacity="0.75"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 301 B |
@ -0,0 +1,3 @@
|
||||
<svg width="12" height="21" viewBox="0 0 12 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.72994 2.25V9.24H10.3499V11.49H2.72994V18.69H11.2499V20.94H-5.83827e-05V2.02656e-06H11.2499V2.25H2.72994Z" fill="#2B353E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 242 B |
@ -1,73 +1,73 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
void main() async {
|
||||
final file = File('assets/json/body_symptoms_data.json');
|
||||
final content = await file.readAsString();
|
||||
|
||||
print('File size: ${content.length} characters');
|
||||
|
||||
// Split into two parts
|
||||
final parts = content.split('export const SymptomsData = [');
|
||||
if (parts.length != 2) {
|
||||
print('ERROR: Could not split file properly');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
print('Split into ${parts.length} parts');
|
||||
|
||||
// Process BodySymptomsData
|
||||
var bodyPart = parts[0]
|
||||
.replaceAll('export const BodySymptomsData = ', '')
|
||||
.trim()
|
||||
.replaceAll(RegExp(r';$'), '');
|
||||
|
||||
print('Parsing body symptoms...');
|
||||
Map<String, dynamic> bodySymptomsData;
|
||||
try {
|
||||
bodySymptomsData = json.decode(bodyPart);
|
||||
print('✅ Body symptoms parsed: ${bodySymptomsData.length} body parts');
|
||||
} catch (e) {
|
||||
print('❌ Error parsing body symptoms: $e');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Process SymptomsData
|
||||
print('Processing symptoms data...');
|
||||
var symptomsPart = parts[1]
|
||||
.trim()
|
||||
.replaceAll(RegExp(r'\];$'), '')
|
||||
.replaceAllMapped(RegExp(r'\n(\s*)id:'), (m) => '\n${m.group(1)}"id":')
|
||||
.replaceAllMapped(RegExp(r'\n(\s*)type:'), (m) => '\n${m.group(1)}"type":')
|
||||
.replaceAllMapped(RegExp(r'\n(\s*)name:'), (m) => '\n${m.group(1)}"name":')
|
||||
.replaceAllMapped(RegExp(r'\n(\s*)common_name:'), (m) => '\n${m.group(1)}"common_name":');
|
||||
|
||||
print('Parsing symptoms...');
|
||||
List<dynamic> symptomsData;
|
||||
try {
|
||||
symptomsData = json.decode('[$symptomsPart]');
|
||||
print('✅ Symptoms parsed: ${symptomsData.length} symptoms');
|
||||
} catch (e) {
|
||||
print('❌ Error parsing symptoms: $e');
|
||||
print('First 1000 chars:');
|
||||
print('[$symptomsPart]'.substring(0, 1000));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Create final JSON
|
||||
print('Creating final JSON structure...');
|
||||
final jsonStructure = {
|
||||
'bodySymptoms': bodySymptomsData,
|
||||
'symptoms': symptomsData,
|
||||
};
|
||||
|
||||
// Write to file
|
||||
print('Writing to file...');
|
||||
final encoder = JsonEncoder.withIndent(' ');
|
||||
await file.writeAsString(encoder.convert(jsonStructure));
|
||||
|
||||
print('\n✅ SUCCESS! File converted to proper JSON');
|
||||
print('✅ Body parts: ${bodySymptomsData.length}');
|
||||
print('✅ Symptoms: ${symptomsData.length}');
|
||||
}
|
||||
|
||||
// import 'dart:convert';
|
||||
// import 'dart:io';
|
||||
//
|
||||
// void main() async {
|
||||
// final file = File('assets/json/body_symptoms_data.json');
|
||||
// final content = await file.readAsString();
|
||||
//
|
||||
// print('File size: ${content.length} characters');
|
||||
//
|
||||
// // Split into two parts
|
||||
// final parts = content.split('export const SymptomsData = [');
|
||||
// if (parts.length != 2) {
|
||||
// print('ERROR: Could not split file properly');
|
||||
// exit(1);
|
||||
// }
|
||||
//
|
||||
// print('Split into ${parts.length} parts');
|
||||
//
|
||||
// // Process BodySymptomsData
|
||||
// var bodyPart = parts[0]
|
||||
// .replaceAll('export const BodySymptomsData = ', '')
|
||||
// .trim()
|
||||
// .replaceAll(RegExp(r';$'), '');
|
||||
//
|
||||
// print('Parsing body symptoms...');
|
||||
// Map<String, dynamic> bodySymptomsData;
|
||||
// try {
|
||||
// bodySymptomsData = json.decode(bodyPart);
|
||||
// print('✅ Body symptoms parsed: ${bodySymptomsData.length} body parts');
|
||||
// } catch (e) {
|
||||
// print('❌ Error parsing body symptoms: $e');
|
||||
// exit(1);
|
||||
// }
|
||||
//
|
||||
// // Process SymptomsData
|
||||
// print('Processing symptoms data...');
|
||||
// var symptomsPart = parts[1]
|
||||
// .trim()
|
||||
// .replaceAll(RegExp(r'\];$'), '')
|
||||
// .replaceAllMapped(RegExp(r'\n(\s*)id:'), (m) => '\n${m.group(1)}"id":')
|
||||
// .replaceAllMapped(RegExp(r'\n(\s*)type:'), (m) => '\n${m.group(1)}"type":')
|
||||
// .replaceAllMapped(RegExp(r'\n(\s*)name:'), (m) => '\n${m.group(1)}"name":')
|
||||
// .replaceAllMapped(RegExp(r'\n(\s*)common_name:'), (m) => '\n${m.group(1)}"common_name":');
|
||||
//
|
||||
// print('Parsing symptoms...');
|
||||
// List<dynamic> symptomsData;
|
||||
// try {
|
||||
// symptomsData = json.decode('[$symptomsPart]');
|
||||
// print('✅ Symptoms parsed: ${symptomsData.length} symptoms');
|
||||
// } catch (e) {
|
||||
// print('❌ Error parsing symptoms: $e');
|
||||
// print('First 1000 chars:');
|
||||
// print('[$symptomsPart]'.substring(0, 1000));
|
||||
// exit(1);
|
||||
// }
|
||||
//
|
||||
// // Create final JSON
|
||||
// print('Creating final JSON structure...');
|
||||
// final jsonStructure = {
|
||||
// 'bodySymptoms': bodySymptomsData,
|
||||
// 'symptoms': symptomsData,
|
||||
// };
|
||||
//
|
||||
// // Write to file
|
||||
// print('Writing to file...');
|
||||
// final encoder = JsonEncoder.withIndent(' ');
|
||||
// await file.writeAsString(encoder.convert(jsonStructure));
|
||||
//
|
||||
// print('\n✅ SUCCESS! File converted to proper JSON');
|
||||
// print('✅ Body parts: ${bodySymptomsData.length}');
|
||||
// print('✅ Symptoms: ${symptomsData.length}');
|
||||
// }
|
||||
//
|
||||
|
||||
@ -1,97 +1,97 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/enums.dart';
|
||||
|
||||
class ConditionsModel {
|
||||
final IconData icon;
|
||||
final String title;
|
||||
final int percentage;
|
||||
final String tagText;
|
||||
final String clinic;
|
||||
final List<String> symptoms;
|
||||
final String description;
|
||||
final String? monitorNote;
|
||||
final String? appointmentLabel;
|
||||
final PossibleConditionsSeverityEnum possibleConditionsSeverityEnum;
|
||||
|
||||
ConditionsModel({
|
||||
required this.icon,
|
||||
required this.title,
|
||||
required this.percentage,
|
||||
required this.tagText,
|
||||
required this.clinic,
|
||||
required this.symptoms,
|
||||
required this.description,
|
||||
required this.possibleConditionsSeverityEnum,
|
||||
this.monitorNote,
|
||||
this.appointmentLabel,
|
||||
});
|
||||
}
|
||||
|
||||
List<ConditionsModel> dummyConditions = [
|
||||
ConditionsModel(
|
||||
icon: Icons.psychology_alt,
|
||||
possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice,
|
||||
title: "Migraine",
|
||||
percentage: 87,
|
||||
tagText: "Seek Medical Advice",
|
||||
clinic: "Internal Medicine Clinic",
|
||||
symptoms: ["Headache", "Nausea", "Sensitivity to light"],
|
||||
description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.",
|
||||
appointmentLabel: "Book Appointment",
|
||||
),
|
||||
ConditionsModel(
|
||||
icon: Icons.deblur,
|
||||
title: "Tension Headache",
|
||||
percentage: 37,
|
||||
tagText: "Monitor",
|
||||
monitorNote: "No need to visit doctor",
|
||||
clinic: "GP Clinic",
|
||||
symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly,
|
||||
),
|
||||
ConditionsModel(
|
||||
icon: Icons.medication_liquid,
|
||||
title: "Meningitis",
|
||||
percentage: 28,
|
||||
tagText: "Emergency",
|
||||
clinic: "Neurology Clinic",
|
||||
symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
appointmentLabel: "Book Appointment",
|
||||
possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency,
|
||||
),
|
||||
ConditionsModel(
|
||||
icon: Icons.psychology_alt,
|
||||
title: "Migraine",
|
||||
percentage: 87,
|
||||
tagText: "Seek Medical Advice",
|
||||
clinic: "Internal Medicine Clinic",
|
||||
symptoms: ["Headache", "Nausea", "Sensitivity to light"],
|
||||
description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.",
|
||||
appointmentLabel: "Book Appointment",
|
||||
possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice,
|
||||
),
|
||||
ConditionsModel(
|
||||
icon: Icons.deblur,
|
||||
title: "Tension Headache",
|
||||
percentage: 37,
|
||||
tagText: "Monitor",
|
||||
monitorNote: "No need to visit doctor",
|
||||
clinic: "GP Clinic",
|
||||
symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly,
|
||||
),
|
||||
ConditionsModel(
|
||||
icon: Icons.medication_liquid,
|
||||
title: "Meningitis",
|
||||
percentage: 28,
|
||||
tagText: "Emergency",
|
||||
clinic: "Neurology Clinic",
|
||||
symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
appointmentLabel: "Book Appointment",
|
||||
possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency,
|
||||
),
|
||||
];
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:hmg_patient_app_new/core/enums.dart';
|
||||
//
|
||||
// class ConditionsModel {
|
||||
// final IconData icon;
|
||||
// final String title;
|
||||
// final int percentage;
|
||||
// final String tagText;
|
||||
// final String clinic;
|
||||
// final List<String> symptoms;
|
||||
// final String description;
|
||||
// final String? monitorNote;
|
||||
// final String? appointmentLabel;
|
||||
// final PossibleConditionsSeverityEnum possibleConditionsSeverityEnum;
|
||||
//
|
||||
// ConditionsModel({
|
||||
// required this.icon,
|
||||
// required this.title,
|
||||
// required this.percentage,
|
||||
// required this.tagText,
|
||||
// required this.clinic,
|
||||
// required this.symptoms,
|
||||
// required this.description,
|
||||
// required this.possibleConditionsSeverityEnum,
|
||||
// this.monitorNote,
|
||||
// this.appointmentLabel,
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// List<ConditionsModel> dummyConditions = [
|
||||
// ConditionsModel(
|
||||
// icon: Icons.psychology_alt,
|
||||
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice,
|
||||
// title: "Migraine",
|
||||
// percentage: 87,
|
||||
// tagText: "Seek Medical Advice",
|
||||
// clinic: "Internal Medicine Clinic",
|
||||
// symptoms: ["Headache", "Nausea", "Sensitivity to light"],
|
||||
// description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.",
|
||||
// appointmentLabel: "Book Appointment",
|
||||
// ),
|
||||
// ConditionsModel(
|
||||
// icon: Icons.deblur,
|
||||
// title: "Tension Headache",
|
||||
// percentage: 37,
|
||||
// tagText: "Monitor",
|
||||
// monitorNote: "No need to visit doctor",
|
||||
// clinic: "GP Clinic",
|
||||
// symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly,
|
||||
// ),
|
||||
// ConditionsModel(
|
||||
// icon: Icons.medication_liquid,
|
||||
// title: "Meningitis",
|
||||
// percentage: 28,
|
||||
// tagText: "Emergency",
|
||||
// clinic: "Neurology Clinic",
|
||||
// symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
// appointmentLabel: "Book Appointment",
|
||||
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency,
|
||||
// ),
|
||||
// ConditionsModel(
|
||||
// icon: Icons.psychology_alt,
|
||||
// title: "Migraine",
|
||||
// percentage: 87,
|
||||
// tagText: "Seek Medical Advice",
|
||||
// clinic: "Internal Medicine Clinic",
|
||||
// symptoms: ["Headache", "Nausea", "Sensitivity to light"],
|
||||
// description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.",
|
||||
// appointmentLabel: "Book Appointment",
|
||||
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice,
|
||||
// ),
|
||||
// ConditionsModel(
|
||||
// icon: Icons.deblur,
|
||||
// title: "Tension Headache",
|
||||
// percentage: 37,
|
||||
// tagText: "Monitor",
|
||||
// monitorNote: "No need to visit doctor",
|
||||
// clinic: "GP Clinic",
|
||||
// symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly,
|
||||
// ),
|
||||
// ConditionsModel(
|
||||
// icon: Icons.medication_liquid,
|
||||
// title: "Meningitis",
|
||||
// percentage: 28,
|
||||
// tagText: "Emergency",
|
||||
// clinic: "Neurology Clinic",
|
||||
// symptoms: ["Mild head pressure", "Scalp tenderness"],
|
||||
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
|
||||
// appointmentLabel: "Book Appointment",
|
||||
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency,
|
||||
// ),
|
||||
// ];
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue