You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1022 B
40 lines
1022 B
8 months ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:doctor/common/settings.dart';
|
||
|
|
||
|
class PrescriptionsModel {
|
||
|
String prescription_name = '';
|
||
|
String patient_name='';
|
||
|
String prescription_url='';
|
||
|
String age='';
|
||
|
String gender='';
|
||
|
String patient_type='';
|
||
|
List prescriptionUrls=[];
|
||
|
|
||
|
|
||
|
PrescriptionsModel();
|
||
|
|
||
|
factory PrescriptionsModel.fromJson(Map<String, dynamic> json){
|
||
|
PrescriptionsModel rtvm = new PrescriptionsModel();
|
||
|
|
||
|
rtvm.prescriptionUrls=json['precription']??[];
|
||
|
|
||
|
/*rtvm.prescription_name = json['name'] ?? '';
|
||
|
rtvm.patient_type = json['patientType'] ?? '';
|
||
|
rtvm.prescription_url = json['pictureUrl'][0] ?? '';
|
||
|
|
||
|
if(rtvm.patient_type.toString().toLowerCase()=='self'){
|
||
|
rtvm.age=AppSettings.age;
|
||
|
rtvm.gender=AppSettings.gender;
|
||
|
rtvm.patient_name=AppSettings.userName;
|
||
|
}
|
||
|
|
||
|
else{
|
||
|
rtvm.age=json['others']['age'].toString();
|
||
|
rtvm.gender=json['others']['gender'];
|
||
|
rtvm.patient_name=json['others']['name'];
|
||
|
}*/
|
||
|
|
||
|
return rtvm;
|
||
|
}
|
||
|
|
||
|
}
|