Browse Source

同步Server最新接口更改

loki.wu 2 years ago
parent
commit
6f0fb44f2a

+ 4 - 1
lib/services/authentication.m.dart

@@ -977,7 +977,7 @@ enum CustomerRpcCode {
 	placeHolder_797,
 	placeHolder_798,
 	placeHolder_799,
-	placeHolder_800,
+	ConsultationStatusError,
 	placeHolder_801,
 	placeHolder_802,
 	placeHolder_803,
@@ -6234,6 +6234,9 @@ enum CustomerRpcCode {
 	PositionNameDuplicate,
 	RankNameDuplicate,
 	OrganizationNameDuplicate,
+	HeadImageUrlNotValid,
+	NicknameTooLong,
+	ThesaurusNameEmpty,
 }
 
 class ValidateTokenResult {

+ 15 - 0
lib/services/notification.dart

@@ -28,5 +28,20 @@ class NotificationService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<bool> broadcastMessageAsync(BroadcastNotificationRequest request) async {
+		var rpcRst = await call("BroadcastMessageAsync", request);
+		return rpcRst;
+	}
+
+	Future<String> openNotifyQueueAsync(OpenNotifyQueueRequest request) async {
+		var rpcRst = await call("OpenNotifyQueueAsync", request);
+		return rpcRst;
+	}
+
+	Future<bool> closeNotifyQueueAsync(CloseNotifyQueueRequest request) async {
+		var rpcRst = await call("CloseNotifyQueueAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 73 - 0
lib/services/notification.m.dart

@@ -76,4 +76,77 @@ class SendNotificationRequest {
 	}
 }
 
+class BroadcastNotificationRequest {
+	List<String >? clientIds;
+	NotifyMessage? message;
+	String? msgQueueId;
+
+	BroadcastNotificationRequest({
+		this.clientIds,
+		this.message,
+		this.msgQueueId,
+	});
+
+	factory BroadcastNotificationRequest.fromJson(Map<String, dynamic> map) {
+		return BroadcastNotificationRequest( 
+			clientIds: map['ClientIds'] != null ? map['ClientIds'].cast<String>().toList() : null,
+			message: map['Message'] != null ? NotifyMessage.fromJson(map['Message']) : null,
+			msgQueueId: map['MsgQueueId'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(clientIds != null)
+			map['ClientIds'] = clientIds;
+		if(message != null)
+			map['Message'] = message;
+		if(msgQueueId != null)
+			map['MsgQueueId'] = msgQueueId;
+		return map;
+	}
+}
+
+class OpenNotifyQueueRequest {
+	String? module;
+
+	OpenNotifyQueueRequest({
+		this.module,
+	});
+
+	factory OpenNotifyQueueRequest.fromJson(Map<String, dynamic> map) {
+		return OpenNotifyQueueRequest( 
+			module: map['Module'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(module != null)
+			map['Module'] = module;
+		return map;
+	}
+}
+
+class CloseNotifyQueueRequest {
+	String? msgQueueId;
+
+	CloseNotifyQueueRequest({
+		this.msgQueueId,
+	});
+
+	factory CloseNotifyQueueRequest.fromJson(Map<String, dynamic> map) {
+		return CloseNotifyQueueRequest( 
+			msgQueueId: map['MsgQueueId'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(msgQueueId != null)
+			map['MsgQueueId'] = msgQueueId;
+		return map;
+	}
+}
+
 

+ 8 - 0
lib/services/patient.m.dart

@@ -135,6 +135,7 @@ class PatientInfoBaseDTO extends BaseDTO{
 	int gender;
 	bool isValid;
 	String? organizationCode;
+	String? rootOrganizationCode;
 	List<String >? assignmentUserCodes;
 	List<DataItemDTO >? patientData;
 	int unReadRecordCount;
@@ -152,6 +153,7 @@ class PatientInfoBaseDTO extends BaseDTO{
 		this.gender = 0,
 		this.isValid = false,
 		this.organizationCode,
+		this.rootOrganizationCode,
 		this.assignmentUserCodes,
 		this.patientData,
 		this.unReadRecordCount = 0,
@@ -176,6 +178,7 @@ class PatientInfoBaseDTO extends BaseDTO{
 			gender: map['Gender'],
 			isValid: map['IsValid'],
 			organizationCode: map['OrganizationCode'],
+			rootOrganizationCode: map['RootOrganizationCode'],
 			assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
 			patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			unReadRecordCount: map['UnReadRecordCount'],
@@ -205,6 +208,8 @@ class PatientInfoBaseDTO extends BaseDTO{
 		map['IsValid'] = isValid;
 		if(organizationCode != null)
 			map['OrganizationCode'] = organizationCode;
+		if(rootOrganizationCode != null)
+			map['RootOrganizationCode'] = rootOrganizationCode;
 		if(assignmentUserCodes != null)
 			map['AssignmentUserCodes'] = assignmentUserCodes;
 		if(patientData != null)
@@ -237,6 +242,7 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 		int gender = 0,
 		bool isValid = false,
 		String? organizationCode,
+		String? rootOrganizationCode,
 		List<String >? assignmentUserCodes,
 		List<DataItemDTO >? patientData,
 		int unReadRecordCount = 0,
@@ -255,6 +261,7 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 			gender: gender,
 			isValid: isValid,
 			organizationCode: organizationCode,
+			rootOrganizationCode: rootOrganizationCode,
 			assignmentUserCodes: assignmentUserCodes,
 			patientData: patientData,
 			unReadRecordCount: unReadRecordCount,
@@ -279,6 +286,7 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 			gender: map['Gender'],
 			isValid: map['IsValid'],
 			organizationCode: map['OrganizationCode'],
+			rootOrganizationCode: map['RootOrganizationCode'],
 			assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
 			patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			unReadRecordCount: map['UnReadRecordCount'],

+ 10 - 0
lib/services/remedical.m.dart

@@ -1941,9 +1941,13 @@ class ModifyReferralRecordRequest extends TokenRequest{
 
 class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
 	String? code;
+	String? outUserName;
+	String? inUserName;
 
 	QueryReferralRecordPageDTO({
 		this.code,
+		this.outUserName,
+		this.inUserName,
 		String? patientCode,
 		bool isValid = false,
 		List<DataItemDTO >? patientData,
@@ -1964,6 +1968,8 @@ class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
 	factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
 		return QueryReferralRecordPageDTO( 
 			code: map['Code'],
+			outUserName: map['OutUserName'],
+			inUserName: map['InUserName'],
 			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,
@@ -1978,6 +1984,10 @@ class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
 		final map = super.toJson();
 		if(code != null)
 			map['Code'] = code;
+		if(outUserName != null)
+			map['OutUserName'] = outUserName;
+		if(inUserName != null)
+			map['InUserName'] = inUserName;
 		return map;
 	}
 }

+ 5 - 0
lib/services/report.dart

@@ -284,5 +284,10 @@ class ReportService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<bool> createReportTemplatePreviewAsync(GetReportTemplateDBRequest request) async {
+		var rpcRst = await call("CreateReportTemplatePreviewAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 42 - 1
lib/services/report.m.dart

@@ -1,6 +1,6 @@
+import 'remedical.m.dart';
 import 'aIDiagnosis.m.dart';
 import 'connect.m.dart';
-import 'remedical.m.dart';
 import 'authentication.m.dart';
 
 enum ReportTemplateStatusTypeEnum {
@@ -32,6 +32,9 @@ class ReportTemplateDTO {
 	List<String >? reportTemplateUser;
 	bool isDefault;
 	bool isUserDefault;
+	String? reportDatasJson;
+	List<ReportPreviewDTO >? templatePreviewList;
+	List<String >? templatePreviewUrlList;
 
 	ReportTemplateDTO({
 		this.reportTemplateCode,
@@ -45,6 +48,9 @@ class ReportTemplateDTO {
 		this.reportTemplateUser,
 		this.isDefault = false,
 		this.isUserDefault = false,
+		this.reportDatasJson,
+		this.templatePreviewList,
+		this.templatePreviewUrlList,
 	});
 
 	factory ReportTemplateDTO.fromJson(Map<String, dynamic> map) {
@@ -60,6 +66,9 @@ class ReportTemplateDTO {
 			reportTemplateUser: map['ReportTemplateUser'] != null ? map['ReportTemplateUser'].cast<String>().toList() : null,
 			isDefault: map['IsDefault'],
 			isUserDefault: map['IsUserDefault'],
+			reportDatasJson: map['ReportDatasJson'],
+			templatePreviewList: map['TemplatePreviewList'] != null ? (map['TemplatePreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			templatePreviewUrlList: map['TemplatePreviewUrlList'] != null ? map['TemplatePreviewUrlList'].cast<String>().toList() : null,
 		);
 	}
 
@@ -82,6 +91,12 @@ class ReportTemplateDTO {
 			map['ReportTemplateUser'] = reportTemplateUser;
 		map['IsDefault'] = isDefault;
 		map['IsUserDefault'] = isUserDefault;
+		if(reportDatasJson != null)
+			map['ReportDatasJson'] = reportDatasJson;
+		if(templatePreviewList != null)
+			map['TemplatePreviewList'] = templatePreviewList;
+		if(templatePreviewUrlList != null)
+			map['TemplatePreviewUrlList'] = templatePreviewUrlList;
 		return map;
 	}
 }
@@ -576,10 +591,12 @@ class CopyOrgReportTemplateRequest extends TokenRequest{
 class FindReportTemplatePagesRequest extends PageRequest{
 	bool? isDefault;
 	String? reportTemplateName;
+	String? languageCode;
 
 	FindReportTemplatePagesRequest({
 		this.isDefault,
 		this.reportTemplateName,
+		this.languageCode,
 		int pageIndex = 0,
 		int pageSize = 0,
 		String? token,
@@ -593,6 +610,7 @@ class FindReportTemplatePagesRequest extends PageRequest{
 		return FindReportTemplatePagesRequest( 
 			isDefault: map['IsDefault'],
 			reportTemplateName: map['ReportTemplateName'],
+			languageCode: map['LanguageCode'],
 			pageIndex: map['PageIndex'],
 			pageSize: map['PageSize'],
 			token: map['Token'],
@@ -605,6 +623,8 @@ class FindReportTemplatePagesRequest extends PageRequest{
 			map['IsDefault'] = isDefault;
 		if(reportTemplateName != null)
 			map['ReportTemplateName'] = reportTemplateName;
+		if(languageCode != null)
+			map['LanguageCode'] = languageCode;
 		return map;
 	}
 }
@@ -1597,4 +1617,25 @@ class SetUserDefaultReportTemplateRequest extends TokenRequest{
 	}
 }
 
+class GetReportTemplateDBRequest {
+	String? reportTemplateCode;
+
+	GetReportTemplateDBRequest({
+		this.reportTemplateCode,
+	});
+
+	factory GetReportTemplateDBRequest.fromJson(Map<String, dynamic> map) {
+		return GetReportTemplateDBRequest( 
+			reportTemplateCode: map['ReportTemplateCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(reportTemplateCode != null)
+			map['ReportTemplateCode'] = reportTemplateCode;
+		return map;
+	}
+}
+