add method
void
add(
- String key,
- dynamic value
)
Implementation
void add(String key, dynamic value) {
if (key == "age" && value is String) {
age = value;
} else if (key == "gender" && value is String) {
gender = value;
} else if (key == "insurance" && (value == "1" || value == 1)) {
insurance = value;
} else if (key == "insuranceType" && insurance == "1" && value is List<dynamic>) {
insuranceType = value;
} else if (key =="insuranceName" && insurance == "1" && value is List<dynamic>) {
insuranceName = value;
} else if (key =="temperature" && value is Map<String, dynamic>) {
temperature = value;
} else if (key =="bp" && value is String) {
bp = value;
} else if (key =="pulse" && value is String) {
pulse = value;
} else if (key =="respiration" && value is String) {
respiration = value;
} else if (key =="labTest" && value is List<dynamic>) {
labTest = value;
} else if (key =="diagnosis" && value is List<dynamic>) {
diagnosis = value;
} else if (key =="prescription" && value is List<dynamic>) {
prescription = value;
} else if (key =="pharmacy" && value is List<dynamic>) {
pharmacy = value;
} else if (key == "labTestHistory" && isHistoryTypeData(value)) {
labTestHistory = value;
} else if (key == "diagnosisHistory" && isHistoryTypeData(value)) {
diagnosisHistory = value;
} else if (key == "prescriptionHistory" && isHistoryTypeData(value)) {
prescriptionHistory = value;
} else if (key == "pharmacyHistory" && isHistoryTypeData(value)) {
pharmacyHistory = value;
}
}