|
@@ -528,6 +528,7 @@ class QueryExamInfoResult {
|
|
|
String? patientSex;
|
|
|
List<PatientInfoExt >? patientInfoExtList;
|
|
|
List<String >? associatedExamCodes;
|
|
|
+ RecordStatusEnum examStatus;
|
|
|
|
|
|
QueryExamInfoResult({
|
|
|
this.createTime,
|
|
@@ -537,6 +538,7 @@ class QueryExamInfoResult {
|
|
|
this.patientSex,
|
|
|
this.patientInfoExtList,
|
|
|
this.associatedExamCodes,
|
|
|
+ this.examStatus = RecordStatusEnum.NotScanned,
|
|
|
});
|
|
|
|
|
|
factory QueryExamInfoResult.fromJson(Map<String, dynamic> map) {
|
|
@@ -548,6 +550,7 @@ class QueryExamInfoResult {
|
|
|
patientSex: map['PatientSex'],
|
|
|
patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
|
|
|
+ examStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -567,6 +570,7 @@ class QueryExamInfoResult {
|
|
|
map['PatientInfoExtList'] = patientInfoExtList;
|
|
|
if(associatedExamCodes != null)
|
|
|
map['AssociatedExamCodes'] = associatedExamCodes;
|
|
|
+ map['ExamStatus'] = examStatus.index;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1330,66 +1334,6 @@ class GetPresetCommentsRequest extends TokenRequest{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class FindDeviceDiagnosisRequest extends TokenRequest{
|
|
|
- String? deviceCode;
|
|
|
-
|
|
|
- FindDeviceDiagnosisRequest({
|
|
|
- this.deviceCode,
|
|
|
- String? token,
|
|
|
- }) : super(
|
|
|
- token: token,
|
|
|
- );
|
|
|
-
|
|
|
- factory FindDeviceDiagnosisRequest.fromJson(Map<String, dynamic> map) {
|
|
|
- return FindDeviceDiagnosisRequest(
|
|
|
- deviceCode: map['DeviceCode'],
|
|
|
- token: map['Token'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(deviceCode != null)
|
|
|
- map['DeviceCode'] = deviceCode;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class DeviceDiagnosisChangedNotification extends TokenRequest{
|
|
|
- String? diagnosisModule;
|
|
|
- String? organizationCode;
|
|
|
- String? deviceCode;
|
|
|
-
|
|
|
- DeviceDiagnosisChangedNotification({
|
|
|
- this.diagnosisModule,
|
|
|
- this.organizationCode,
|
|
|
- this.deviceCode,
|
|
|
- String? token,
|
|
|
- }) : super(
|
|
|
- token: token,
|
|
|
- );
|
|
|
-
|
|
|
- factory DeviceDiagnosisChangedNotification.fromJson(Map<String, dynamic> map) {
|
|
|
- return DeviceDiagnosisChangedNotification(
|
|
|
- diagnosisModule: map['DiagnosisModule'],
|
|
|
- organizationCode: map['OrganizationCode'],
|
|
|
- deviceCode: map['DeviceCode'],
|
|
|
- token: map['Token'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(diagnosisModule != null)
|
|
|
- map['DiagnosisModule'] = diagnosisModule;
|
|
|
- if(organizationCode != null)
|
|
|
- map['OrganizationCode'] = organizationCode;
|
|
|
- if(deviceCode != null)
|
|
|
- map['DeviceCode'] = deviceCode;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
class GetReportElementByLanguageRequest extends TokenRequest{
|
|
|
String? reportDatasJosn;
|
|
|
String? language;
|
|
@@ -2093,4 +2037,886 @@ class ExportRemedicalDataRequest extends TokenRequest{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+class FindCacheByCodeRequest extends TokenRequest{
|
|
|
+ String? cacheCode;
|
|
|
+
|
|
|
+ FindCacheByCodeRequest({
|
|
|
+ this.cacheCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory FindCacheByCodeRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FindCacheByCodeRequest(
|
|
|
+ cacheCode: map['CacheCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(cacheCode != null)
|
|
|
+ map['CacheCode'] = cacheCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class CreateReferralRecordRequest extends TokenRequest{
|
|
|
+ String? patientCode;
|
|
|
+ String? subjectMatter;
|
|
|
+ String? referralOrganizationCode;
|
|
|
+ String? referralUserCode;
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ CreateReferralRecordRequest({
|
|
|
+ this.patientCode,
|
|
|
+ this.subjectMatter,
|
|
|
+ this.referralOrganizationCode,
|
|
|
+ this.referralUserCode,
|
|
|
+ this.referralRecordCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory CreateReferralRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CreateReferralRecordRequest(
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ subjectMatter: map['SubjectMatter'],
|
|
|
+ referralOrganizationCode: map['ReferralOrganizationCode'],
|
|
|
+ referralUserCode: map['ReferralUserCode'],
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(patientCode != null)
|
|
|
+ map['PatientCode'] = patientCode;
|
|
|
+ if(subjectMatter != null)
|
|
|
+ map['SubjectMatter'] = subjectMatter;
|
|
|
+ if(referralOrganizationCode != null)
|
|
|
+ map['ReferralOrganizationCode'] = referralOrganizationCode;
|
|
|
+ if(referralUserCode != null)
|
|
|
+ map['ReferralUserCode'] = referralUserCode;
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
|
|
|
+ String? code;
|
|
|
+
|
|
|
+ QueryReferralRecordPageDTO({
|
|
|
+ this.code,
|
|
|
+ String? patientCode,
|
|
|
+ bool isValid = false,
|
|
|
+ List<DataItemDTO >? patientData,
|
|
|
+ int unReadRecordCount = 0,
|
|
|
+ bool isReferral = false,
|
|
|
+ DateTime? createTime,
|
|
|
+ DateTime? updateTime,
|
|
|
+ }) : super(
|
|
|
+ patientCode: patientCode,
|
|
|
+ isValid: isValid,
|
|
|
+ patientData: patientData,
|
|
|
+ unReadRecordCount: unReadRecordCount,
|
|
|
+ isReferral: isReferral,
|
|
|
+ createTime: createTime,
|
|
|
+ updateTime: updateTime,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryReferralRecordPageDTO(
|
|
|
+ code: map['Code'],
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ isValid: map['IsValid'],
|
|
|
+ patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ unReadRecordCount: map['UnReadRecordCount'],
|
|
|
+ isReferral: map['IsReferral'],
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(code != null)
|
|
|
+ map['Code'] = code;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryReferralRecordListRequest extends PageRequest{
|
|
|
+ String? keyWord;
|
|
|
+ DateTime? startTime;
|
|
|
+ DateTime? endTime;
|
|
|
+ PatientValidStatusEnum isValid;
|
|
|
+
|
|
|
+ QueryReferralRecordListRequest({
|
|
|
+ this.keyWord,
|
|
|
+ this.startTime,
|
|
|
+ this.endTime,
|
|
|
+ this.isValid = PatientValidStatusEnum.All,
|
|
|
+ int pageIndex = 0,
|
|
|
+ int pageSize = 0,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ pageIndex: pageIndex,
|
|
|
+ pageSize: pageSize,
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryReferralRecordListRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryReferralRecordListRequest(
|
|
|
+ keyWord: map['KeyWord'],
|
|
|
+ startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
|
|
|
+ endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
|
|
|
+ isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
|
|
|
+ pageIndex: map['PageIndex'],
|
|
|
+ pageSize: map['PageSize'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(keyWord != null)
|
|
|
+ map['KeyWord'] = keyWord;
|
|
|
+ if(startTime != null)
|
|
|
+ map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
|
|
|
+ if(endTime != null)
|
|
|
+ map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
|
|
|
+ map['IsValid'] = isValid.index;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class AuditReferralRecordRequest extends TokenRequest{
|
|
|
+ String? referralRecordCode;
|
|
|
+ bool isReceive;
|
|
|
+ String? rejectReason;
|
|
|
+
|
|
|
+ AuditReferralRecordRequest({
|
|
|
+ this.referralRecordCode,
|
|
|
+ this.isReceive = false,
|
|
|
+ this.rejectReason,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory AuditReferralRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return AuditReferralRecordRequest(
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ isReceive: map['IsReceive'],
|
|
|
+ rejectReason: map['RejectReason'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ map['IsReceive'] = isReceive;
|
|
|
+ if(rejectReason != null)
|
|
|
+ map['RejectReason'] = rejectReason;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class WithdrawReferralRecordRequest extends TokenRequest{
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ WithdrawReferralRecordRequest({
|
|
|
+ this.referralRecordCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory WithdrawReferralRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return WithdrawReferralRecordRequest(
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ReferralOrganizationsQueryRequest extends TokenRequest{
|
|
|
+ String? keyword;
|
|
|
+
|
|
|
+ ReferralOrganizationsQueryRequest({
|
|
|
+ this.keyword,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory ReferralOrganizationsQueryRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReferralOrganizationsQueryRequest(
|
|
|
+ keyword: map['Keyword'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(keyword != null)
|
|
|
+ map['Keyword'] = keyword;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ QueryReferralPatientByCodeRequest({
|
|
|
+ this.referralRecordCode,
|
|
|
+ String? code,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ code: code,
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryReferralPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryReferralPatientByCodeRequest(
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ code: map['Code'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+enum ReferralStatusEnum {
|
|
|
+ Wait,
|
|
|
+ Withdrawn,
|
|
|
+ TimedOut,
|
|
|
+ Accepted,
|
|
|
+ Rejected,
|
|
|
+}
|
|
|
+
|
|
|
+class CreateReportClass {
|
|
|
+ String? referralCode;
|
|
|
+ String? creatorCode;
|
|
|
+ String? reportCode;
|
|
|
+
|
|
|
+ CreateReportClass({
|
|
|
+ this.referralCode,
|
|
|
+ this.creatorCode,
|
|
|
+ this.reportCode,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory CreateReportClass.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CreateReportClass(
|
|
|
+ referralCode: map['ReferralCode'],
|
|
|
+ creatorCode: map['CreatorCode'],
|
|
|
+ reportCode: map['ReportCode'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(referralCode != null)
|
|
|
+ map['ReferralCode'] = referralCode;
|
|
|
+ if(creatorCode != null)
|
|
|
+ map['CreatorCode'] = creatorCode;
|
|
|
+ if(reportCode != null)
|
|
|
+ map['ReportCode'] = reportCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ReferralRecordDTO extends BaseDTO{
|
|
|
+ String? code;
|
|
|
+ String? patientCode;
|
|
|
+ DateTime? referralOutTime;
|
|
|
+ String? referralOutOrganizationCode;
|
|
|
+ String? subjectMatter;
|
|
|
+ String? creator;
|
|
|
+ String? referralInOrganizationCode;
|
|
|
+ String? referralInUserCode;
|
|
|
+ ReferralStatusEnum referralStatus;
|
|
|
+ String? rejectReason;
|
|
|
+ List<String >? referralCodeList;
|
|
|
+ PatientInfoDTO? patientInfo;
|
|
|
+ List<String >? recordCodeList;
|
|
|
+ List<String >? reportCodeList;
|
|
|
+ List<String >? remedicalDataCodeList;
|
|
|
+ List<CreateReportClass >? createReportCodeList;
|
|
|
+
|
|
|
+ ReferralRecordDTO({
|
|
|
+ this.code,
|
|
|
+ this.patientCode,
|
|
|
+ this.referralOutTime,
|
|
|
+ this.referralOutOrganizationCode,
|
|
|
+ this.subjectMatter,
|
|
|
+ this.creator,
|
|
|
+ this.referralInOrganizationCode,
|
|
|
+ this.referralInUserCode,
|
|
|
+ this.referralStatus = ReferralStatusEnum.Wait,
|
|
|
+ this.rejectReason,
|
|
|
+ this.referralCodeList,
|
|
|
+ this.patientInfo,
|
|
|
+ this.recordCodeList,
|
|
|
+ this.reportCodeList,
|
|
|
+ this.remedicalDataCodeList,
|
|
|
+ this.createReportCodeList,
|
|
|
+ DateTime? createTime,
|
|
|
+ DateTime? updateTime,
|
|
|
+ }) : super(
|
|
|
+ createTime: createTime,
|
|
|
+ updateTime: updateTime,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory ReferralRecordDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReferralRecordDTO(
|
|
|
+ code: map['Code'],
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
|
|
|
+ referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
|
|
|
+ subjectMatter: map['SubjectMatter'],
|
|
|
+ creator: map['Creator'],
|
|
|
+ referralInOrganizationCode: map['ReferralInOrganizationCode'],
|
|
|
+ referralInUserCode: map['ReferralInUserCode'],
|
|
|
+ referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
|
|
|
+ rejectReason: map['RejectReason'],
|
|
|
+ referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
|
|
|
+ patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
|
|
|
+ recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
|
|
|
+ reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
|
|
|
+ remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
|
|
|
+ createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(code != null)
|
|
|
+ map['Code'] = code;
|
|
|
+ if(patientCode != null)
|
|
|
+ map['PatientCode'] = patientCode;
|
|
|
+ if(referralOutTime != null)
|
|
|
+ map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!);
|
|
|
+ if(referralOutOrganizationCode != null)
|
|
|
+ map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
|
|
|
+ if(subjectMatter != null)
|
|
|
+ map['SubjectMatter'] = subjectMatter;
|
|
|
+ if(creator != null)
|
|
|
+ map['Creator'] = creator;
|
|
|
+ if(referralInOrganizationCode != null)
|
|
|
+ map['ReferralInOrganizationCode'] = referralInOrganizationCode;
|
|
|
+ if(referralInUserCode != null)
|
|
|
+ map['ReferralInUserCode'] = referralInUserCode;
|
|
|
+ map['ReferralStatus'] = referralStatus.index;
|
|
|
+ if(rejectReason != null)
|
|
|
+ map['RejectReason'] = rejectReason;
|
|
|
+ if(referralCodeList != null)
|
|
|
+ map['ReferralCodeList'] = referralCodeList;
|
|
|
+ if(patientInfo != null)
|
|
|
+ map['PatientInfo'] = patientInfo;
|
|
|
+ if(recordCodeList != null)
|
|
|
+ map['RecordCodeList'] = recordCodeList;
|
|
|
+ if(reportCodeList != null)
|
|
|
+ map['ReportCodeList'] = reportCodeList;
|
|
|
+ if(remedicalDataCodeList != null)
|
|
|
+ map['RemedicalDataCodeList'] = remedicalDataCodeList;
|
|
|
+ if(createReportCodeList != null)
|
|
|
+ map['CreateReportCodeList'] = createReportCodeList;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ReferralRecordDetailDTO extends ReferralRecordDTO{
|
|
|
+ String? referralOutOrganizationName;
|
|
|
+ String? creatorName;
|
|
|
+ String? referralInOrganizationName;
|
|
|
+ String? referralInUserName;
|
|
|
+
|
|
|
+ ReferralRecordDetailDTO({
|
|
|
+ this.referralOutOrganizationName,
|
|
|
+ this.creatorName,
|
|
|
+ this.referralInOrganizationName,
|
|
|
+ this.referralInUserName,
|
|
|
+ String? code,
|
|
|
+ String? patientCode,
|
|
|
+ DateTime? referralOutTime,
|
|
|
+ String? referralOutOrganizationCode,
|
|
|
+ String? subjectMatter,
|
|
|
+ String? creator,
|
|
|
+ String? referralInOrganizationCode,
|
|
|
+ String? referralInUserCode,
|
|
|
+ ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait,
|
|
|
+ String? rejectReason,
|
|
|
+ List<String >? referralCodeList,
|
|
|
+ PatientInfoDTO? patientInfo,
|
|
|
+ List<String >? recordCodeList,
|
|
|
+ List<String >? reportCodeList,
|
|
|
+ List<String >? remedicalDataCodeList,
|
|
|
+ List<CreateReportClass >? createReportCodeList,
|
|
|
+ DateTime? createTime,
|
|
|
+ DateTime? updateTime,
|
|
|
+ }) : super(
|
|
|
+ code: code,
|
|
|
+ patientCode: patientCode,
|
|
|
+ referralOutTime: referralOutTime,
|
|
|
+ referralOutOrganizationCode: referralOutOrganizationCode,
|
|
|
+ subjectMatter: subjectMatter,
|
|
|
+ creator: creator,
|
|
|
+ referralInOrganizationCode: referralInOrganizationCode,
|
|
|
+ referralInUserCode: referralInUserCode,
|
|
|
+ referralStatus: referralStatus,
|
|
|
+ rejectReason: rejectReason,
|
|
|
+ referralCodeList: referralCodeList,
|
|
|
+ patientInfo: patientInfo,
|
|
|
+ recordCodeList: recordCodeList,
|
|
|
+ reportCodeList: reportCodeList,
|
|
|
+ remedicalDataCodeList: remedicalDataCodeList,
|
|
|
+ createReportCodeList: createReportCodeList,
|
|
|
+ createTime: createTime,
|
|
|
+ updateTime: updateTime,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory ReferralRecordDetailDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReferralRecordDetailDTO(
|
|
|
+ referralOutOrganizationName: map['ReferralOutOrganizationName'],
|
|
|
+ creatorName: map['CreatorName'],
|
|
|
+ referralInOrganizationName: map['ReferralInOrganizationName'],
|
|
|
+ referralInUserName: map['ReferralInUserName'],
|
|
|
+ code: map['Code'],
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
|
|
|
+ referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
|
|
|
+ subjectMatter: map['SubjectMatter'],
|
|
|
+ creator: map['Creator'],
|
|
|
+ referralInOrganizationCode: map['ReferralInOrganizationCode'],
|
|
|
+ referralInUserCode: map['ReferralInUserCode'],
|
|
|
+ referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
|
|
|
+ rejectReason: map['RejectReason'],
|
|
|
+ referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
|
|
|
+ patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
|
|
|
+ recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
|
|
|
+ reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
|
|
|
+ remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
|
|
|
+ createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralOutOrganizationName != null)
|
|
|
+ map['ReferralOutOrganizationName'] = referralOutOrganizationName;
|
|
|
+ if(creatorName != null)
|
|
|
+ map['CreatorName'] = creatorName;
|
|
|
+ if(referralInOrganizationName != null)
|
|
|
+ map['ReferralInOrganizationName'] = referralInOrganizationName;
|
|
|
+ if(referralInUserName != null)
|
|
|
+ map['ReferralInUserName'] = referralInUserName;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class FindPatientReferralRecordRequest extends TokenRequest{
|
|
|
+ String? patientCode;
|
|
|
+
|
|
|
+ FindPatientReferralRecordRequest({
|
|
|
+ this.patientCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory FindPatientReferralRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FindPatientReferralRecordRequest(
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(patientCode != null)
|
|
|
+ map['PatientCode'] = patientCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class FindReferralInRecordRequest extends TokenRequest{
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ FindReferralInRecordRequest({
|
|
|
+ this.referralRecordCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory FindReferralInRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FindReferralInRecordRequest(
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ QueryReferralRecordsPageRequest({
|
|
|
+ this.referralRecordCode,
|
|
|
+ String? patientCode,
|
|
|
+ QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All,
|
|
|
+ QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All,
|
|
|
+ int pageIndex = 0,
|
|
|
+ int pageSize = 0,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ patientCode: patientCode,
|
|
|
+ queryRecordStatus: queryRecordStatus,
|
|
|
+ queryRecordCreateType: queryRecordCreateType,
|
|
|
+ pageIndex: pageIndex,
|
|
|
+ pageSize: pageSize,
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryReferralRecordsPageRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryReferralRecordsPageRequest(
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
|
|
|
+ queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
|
|
|
+ pageIndex: map['PageIndex'],
|
|
|
+ pageSize: map['PageSize'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+enum UploadFileTypeEnum {
|
|
|
+ Unknown,
|
|
|
+ EXE,
|
|
|
+ APK,
|
|
|
+ IPA,
|
|
|
+ ZIP,
|
|
|
+ DAT,
|
|
|
+ RAR,
|
|
|
+ PNG,
|
|
|
+ ICON,
|
|
|
+ BMP,
|
|
|
+ JPEG,
|
|
|
+ JPG,
|
|
|
+ GIF,
|
|
|
+ WEBP,
|
|
|
+ TIFF,
|
|
|
+ IMG,
|
|
|
+ PDF,
|
|
|
+ DOC,
|
|
|
+ DOCX,
|
|
|
+ XLS,
|
|
|
+ XLSX,
|
|
|
+ MP4,
|
|
|
+ MSI,
|
|
|
+ VID,
|
|
|
+}
|
|
|
+
|
|
|
+class ReportPreviewDTO {
|
|
|
+ String? fileToken;
|
|
|
+ String? thumbnailToken;
|
|
|
+ String? language;
|
|
|
+ UploadFileTypeEnum fileType;
|
|
|
+
|
|
|
+ ReportPreviewDTO({
|
|
|
+ this.fileToken,
|
|
|
+ this.thumbnailToken,
|
|
|
+ this.language,
|
|
|
+ this.fileType = UploadFileTypeEnum.Unknown,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory ReportPreviewDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReportPreviewDTO(
|
|
|
+ fileToken: map['FileToken'],
|
|
|
+ thumbnailToken: map['ThumbnailToken'],
|
|
|
+ language: map['Language'],
|
|
|
+ fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(fileToken != null)
|
|
|
+ map['FileToken'] = fileToken;
|
|
|
+ if(thumbnailToken != null)
|
|
|
+ map['ThumbnailToken'] = thumbnailToken;
|
|
|
+ if(language != null)
|
|
|
+ map['Language'] = language;
|
|
|
+ map['FileType'] = fileType.index;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ReportBaseDTO extends BaseDTO{
|
|
|
+ String? reportCode;
|
|
|
+ String? recordCode;
|
|
|
+ String? reportUserCode;
|
|
|
+ String? deviceCode;
|
|
|
+ String? patientCode;
|
|
|
+ String? patientId;
|
|
|
+ String? patientName;
|
|
|
+ List<String >? reportLabels;
|
|
|
+ List<String >? platformLabels;
|
|
|
+ List<String >? diagnosisLabels;
|
|
|
+ DiagnosisOrganEnum reportOrgan;
|
|
|
+ DateTime? reportTime;
|
|
|
+ String? reportUserName;
|
|
|
+ List<ReportPreviewDTO >? reportPreviewList;
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ ReportBaseDTO({
|
|
|
+ this.reportCode,
|
|
|
+ this.recordCode,
|
|
|
+ this.reportUserCode,
|
|
|
+ this.deviceCode,
|
|
|
+ this.patientCode,
|
|
|
+ this.patientId,
|
|
|
+ this.patientName,
|
|
|
+ this.reportLabels,
|
|
|
+ this.platformLabels,
|
|
|
+ this.diagnosisLabels,
|
|
|
+ this.reportOrgan = DiagnosisOrganEnum.Null,
|
|
|
+ this.reportTime,
|
|
|
+ this.reportUserName,
|
|
|
+ this.reportPreviewList,
|
|
|
+ this.referralRecordCode,
|
|
|
+ DateTime? createTime,
|
|
|
+ DateTime? updateTime,
|
|
|
+ }) : super(
|
|
|
+ createTime: createTime,
|
|
|
+ updateTime: updateTime,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory ReportBaseDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReportBaseDTO(
|
|
|
+ reportCode: map['ReportCode'],
|
|
|
+ recordCode: map['RecordCode'],
|
|
|
+ reportUserCode: map['ReportUserCode'],
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ patientId: map['PatientId'],
|
|
|
+ patientName: map['PatientName'],
|
|
|
+ reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
|
|
|
+ platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
|
|
|
+ diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
|
|
|
+ reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
|
|
|
+ reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
|
|
|
+ reportUserName: map['ReportUserName'],
|
|
|
+ reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(reportCode != null)
|
|
|
+ map['ReportCode'] = reportCode;
|
|
|
+ if(recordCode != null)
|
|
|
+ map['RecordCode'] = recordCode;
|
|
|
+ if(reportUserCode != null)
|
|
|
+ map['ReportUserCode'] = reportUserCode;
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
+ if(patientCode != null)
|
|
|
+ map['PatientCode'] = patientCode;
|
|
|
+ if(patientId != null)
|
|
|
+ map['PatientId'] = patientId;
|
|
|
+ if(patientName != null)
|
|
|
+ map['PatientName'] = patientName;
|
|
|
+ if(reportLabels != null)
|
|
|
+ map['ReportLabels'] = reportLabels;
|
|
|
+ if(platformLabels != null)
|
|
|
+ map['PlatformLabels'] = platformLabels;
|
|
|
+ if(diagnosisLabels != null)
|
|
|
+ map['DiagnosisLabels'] = diagnosisLabels;
|
|
|
+ map['ReportOrgan'] = reportOrgan.index;
|
|
|
+ if(reportTime != null)
|
|
|
+ map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
|
|
|
+ if(reportUserName != null)
|
|
|
+ map['ReportUserName'] = reportUserName;
|
|
|
+ if(reportPreviewList != null)
|
|
|
+ map['ReportPreviewList'] = reportPreviewList;
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ReportDTO extends ReportBaseDTO{
|
|
|
+ String? reportTemplateJson;
|
|
|
+ String? reportDatasJson;
|
|
|
+
|
|
|
+ ReportDTO({
|
|
|
+ this.reportTemplateJson,
|
|
|
+ this.reportDatasJson,
|
|
|
+ String? reportCode,
|
|
|
+ String? recordCode,
|
|
|
+ String? reportUserCode,
|
|
|
+ String? deviceCode,
|
|
|
+ String? patientCode,
|
|
|
+ String? patientId,
|
|
|
+ String? patientName,
|
|
|
+ List<String >? reportLabels,
|
|
|
+ List<String >? platformLabels,
|
|
|
+ List<String >? diagnosisLabels,
|
|
|
+ DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null,
|
|
|
+ DateTime? reportTime,
|
|
|
+ String? reportUserName,
|
|
|
+ List<ReportPreviewDTO >? reportPreviewList,
|
|
|
+ String? referralRecordCode,
|
|
|
+ DateTime? createTime,
|
|
|
+ DateTime? updateTime,
|
|
|
+ }) : super(
|
|
|
+ reportCode: reportCode,
|
|
|
+ recordCode: recordCode,
|
|
|
+ reportUserCode: reportUserCode,
|
|
|
+ deviceCode: deviceCode,
|
|
|
+ patientCode: patientCode,
|
|
|
+ patientId: patientId,
|
|
|
+ patientName: patientName,
|
|
|
+ reportLabels: reportLabels,
|
|
|
+ platformLabels: platformLabels,
|
|
|
+ diagnosisLabels: diagnosisLabels,
|
|
|
+ reportOrgan: reportOrgan,
|
|
|
+ reportTime: reportTime,
|
|
|
+ reportUserName: reportUserName,
|
|
|
+ reportPreviewList: reportPreviewList,
|
|
|
+ referralRecordCode: referralRecordCode,
|
|
|
+ createTime: createTime,
|
|
|
+ updateTime: updateTime,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory ReportDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReportDTO(
|
|
|
+ reportTemplateJson: map['ReportTemplateJson'],
|
|
|
+ reportDatasJson: map['ReportDatasJson'],
|
|
|
+ reportCode: map['ReportCode'],
|
|
|
+ recordCode: map['RecordCode'],
|
|
|
+ reportUserCode: map['ReportUserCode'],
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ patientCode: map['PatientCode'],
|
|
|
+ patientId: map['PatientId'],
|
|
|
+ patientName: map['PatientName'],
|
|
|
+ reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
|
|
|
+ platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
|
|
|
+ diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
|
|
|
+ reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
|
|
|
+ reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
|
|
|
+ reportUserName: map['ReportUserName'],
|
|
|
+ reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(reportTemplateJson != null)
|
|
|
+ map['ReportTemplateJson'] = reportTemplateJson;
|
|
|
+ if(reportDatasJson != null)
|
|
|
+ map['ReportDatasJson'] = reportDatasJson;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class FindExamReportsRequest extends TokenRequest{
|
|
|
+ String? recordCode;
|
|
|
+
|
|
|
+ FindExamReportsRequest({
|
|
|
+ this.recordCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory FindExamReportsRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FindExamReportsRequest(
|
|
|
+ recordCode: map['RecordCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(recordCode != null)
|
|
|
+ map['RecordCode'] = recordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryReferralExamReportRequest extends FindExamReportsRequest{
|
|
|
+ String? referralRecordCode;
|
|
|
+
|
|
|
+ QueryReferralExamReportRequest({
|
|
|
+ this.referralRecordCode,
|
|
|
+ String? recordCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ recordCode: recordCode,
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryReferralExamReportRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryReferralExamReportRequest(
|
|
|
+ referralRecordCode: map['ReferralRecordCode'],
|
|
|
+ recordCode: map['RecordCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(referralRecordCode != null)
|
|
|
+ map['ReferralRecordCode'] = referralRecordCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|