|
@@ -0,0 +1,123 @@
|
|
|
+import 'package:fisjsonrpc/base_model.dart';
|
|
|
+
|
|
|
+class RemedicalFilterModel {
|
|
|
+ RemedicalFilterModel({
|
|
|
+ this.recordId,
|
|
|
+ });
|
|
|
+
|
|
|
+ String? recordId;
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ Map<String, dynamic> map = {};
|
|
|
+ if (this.recordId != null) map['RecordId'] = this.recordId;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class RemedicalQueryRequest extends PagedRequest {
|
|
|
+ RemedicalQueryRequest({
|
|
|
+ int currentPage = 1,
|
|
|
+ int pageSize = 10,
|
|
|
+ this.filter = const {},
|
|
|
+ this.modelFilter,
|
|
|
+ }) : super();
|
|
|
+
|
|
|
+ final Map<String, String> filter;
|
|
|
+ RemedicalFilterModel? modelFilter;
|
|
|
+
|
|
|
+ @override
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ var map = super.toJson();
|
|
|
+ map['filter'] = this.filter;
|
|
|
+ if (this.modelFilter != null)
|
|
|
+ map['modelFilter'] = this.modelFilter!.toJson();
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ factory RemedicalQueryRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return RemedicalQueryRequest(
|
|
|
+ currentPage: map['currentPage'],
|
|
|
+ pageSize: map['pageSize'],
|
|
|
+ filter: map['filter'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class RemedicalModel {
|
|
|
+ RemedicalModel({
|
|
|
+ required this.id,
|
|
|
+ required this.createTime,
|
|
|
+ required this.recordId,
|
|
|
+ required this.patientName,
|
|
|
+ required this.idCardNo,
|
|
|
+ required this.birthday,
|
|
|
+ required this.genderType,
|
|
|
+ this.sourceOrg,
|
|
|
+ this.terminalImages = const [],
|
|
|
+ });
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ Map<String, dynamic> map = {};
|
|
|
+ map['id'] = this.id;
|
|
|
+ map['createTime'] = this.createTime;
|
|
|
+ map['recordId'] = this.recordId;
|
|
|
+ map['patientName'] = this.patientName;
|
|
|
+ map['idCardNo'] = this.idCardNo;
|
|
|
+ map['birthday'] = this.birthday;
|
|
|
+ map['genderType'] = this.genderType;
|
|
|
+ map['terminalImages'] = this.terminalImages.map((e) => e.toJson()).toList();
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ factory RemedicalModel.fromJson(Map<String, dynamic> map) {
|
|
|
+ final imgsData = map['TerminalImages'];
|
|
|
+ return RemedicalModel(
|
|
|
+ id: map['Id'],
|
|
|
+ createTime: map['CreateTime'],
|
|
|
+ recordId: map['RecordId'],
|
|
|
+ patientName: map['PatientName'],
|
|
|
+ idCardNo: map['IdCardNo'],
|
|
|
+ birthday: map['Birthday'],
|
|
|
+ genderType: map['GenderType'],
|
|
|
+ sourceOrg: map['SourceOrg'],
|
|
|
+ terminalImages: imgsData != null
|
|
|
+ ? (imgsData as List)
|
|
|
+ .map((e) => RemedicalTerminalImageModel.fromJson(e))
|
|
|
+ .toList()
|
|
|
+ : const [],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ final String id;
|
|
|
+ final String createTime;
|
|
|
+ final String recordId;
|
|
|
+ final String patientName;
|
|
|
+ final String idCardNo;
|
|
|
+ final String birthday;
|
|
|
+ final int genderType;
|
|
|
+ final String? sourceOrg;
|
|
|
+ final List<RemedicalTerminalImageModel> terminalImages;
|
|
|
+}
|
|
|
+
|
|
|
+class RemedicalTerminalImageModel {
|
|
|
+ RemedicalTerminalImageModel({
|
|
|
+ required this.previewUrl,
|
|
|
+ required this.imageUrl,
|
|
|
+ });
|
|
|
+ factory RemedicalTerminalImageModel.fromJson(Map<String, dynamic> map) {
|
|
|
+ return RemedicalTerminalImageModel(
|
|
|
+ imageUrl: map['ImageUrl'],
|
|
|
+ previewUrl: map['PreviewUrl'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ Map<String, dynamic> map = {};
|
|
|
+ map['previewUrl'] = this.previewUrl;
|
|
|
+ map['imageUrl'] = this.imageUrl;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ final String previewUrl;
|
|
|
+ final String imageUrl;
|
|
|
+}
|