today_patient_model.dart 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'today_patient_model.g.dart';
  3. /// 今日患者模型
  4. @JsonSerializable()
  5. class TodayPatientModel {
  6. @JsonKey(name: 'appointment_uuid')
  7. final String appointmentUUID; // 门诊uuid
  8. final String gender; // 0:未知 1:男 2:女
  9. @JsonKey(name: 'serial_number')
  10. final String serialNumber; // 预约时间段对应的序号
  11. final int action; // 1:预约 2:挂号 3:加号
  12. @JsonKey(name: 'patient_name')
  13. final String patientName; // 患者名称
  14. @JsonKey(name: 'patient_phone')
  15. final String? patientPhone; // 患者手机号
  16. @JsonKey(name: 'doctor_name')
  17. final String? doctorName; // 医生名称
  18. @JsonKey(name: 'his_dept_name')
  19. final String? hisDeptName; // 医生科室
  20. @JsonKey(name: 'day_part')
  21. final String dayPart; // 挂号一天,上午:morning 下午:afternoon 晚上:evening
  22. @JsonKey(name: 'appointment_status')
  23. final int appointmentStatus; // 挂号状态
  24. @JsonKey(name: 'institution_patient_uuid')
  25. final String? institutionPatientUUID; // 机构患者uuid
  26. @JsonKey(name: 'see_doctor_time')
  27. final String? seeDoctorTime; // 就诊时间
  28. @JsonKey(name: 'created_time')
  29. final String createdTime; // 创建时间
  30. @JsonKey(name: 'status_weight')
  31. // 10:待诊 20:待收费 30:待发药 40:已诊 50:已收费 60:已发药 70:已退药 80:已退费 90:已退珍
  32. final int statusWeight;
  33. @JsonKey(name: 'payment_receipt_uuid')
  34. final String paymentReceiptUUID; // 收费和药房的uuid
  35. @JsonKey(name: 'payment_receipt_status')
  36. final int paymentReceiptStatus; // 收费状态
  37. @JsonKey(name: 'prescribes_receipt_status')
  38. final int? prescribesReceiptStatus; // 发药状态
  39. @JsonKey(name: 'is_retail')
  40. final bool isRetail; // 是否零售
  41. @JsonKey(name: 'temporary_reception_status')
  42. // 1:非临时接诊 2:临时接诊 3:临时接诊-已诊
  43. final String temporaryReceptionStatus;
  44. TodayPatientModel({
  45. required this.appointmentUUID,
  46. required this.gender,
  47. required this.serialNumber,
  48. required this.action,
  49. required this.patientName,
  50. this.patientPhone,
  51. this.doctorName,
  52. this.hisDeptName,
  53. required this.dayPart,
  54. required this.appointmentStatus,
  55. this.institutionPatientUUID,
  56. this.seeDoctorTime,
  57. required this.createdTime,
  58. required this.statusWeight,
  59. required this.paymentReceiptUUID,
  60. required this.paymentReceiptStatus,
  61. this.prescribesReceiptStatus,
  62. required this.isRetail,
  63. required this.temporaryReceptionStatus,
  64. });
  65. /// 从 JSON 创建 TodayPatientModel
  66. factory TodayPatientModel.fromJson(Map<String, dynamic> json) =>
  67. _$TodayPatientModelFromJson(json);
  68. /// 转换为 JSON
  69. Map<String, dynamic> toJson() => _$TodayPatientModelToJson(this);
  70. }