浏览代码

同步rpc接口更改

loki.wu 3 年之前
父节点
当前提交
24d928750c

+ 42 - 42
lib/rpc.dart

@@ -11,9 +11,6 @@ import 'interceptor.dart';
 import 'services/index.dart';
 
 export 'services/index.dart';
-export 'request.dart';
-export 'exception.dart';
-export 'interceptor.dart';
 
 typedef T ServiceBuilder<T extends JsonRpcClientBase>();
 
@@ -55,63 +52,65 @@ class JsonRpcProxy {
     return _platformService!;
   }
 
-  AuthenticationService get authentication =>
-      findService(() => new AuthenticationService(currentHostAddress));
+	AuthenticationService get authentication =>
+	findService(() => new AuthenticationService(currentHostAddress));
 
-  ClientLogService get clientLog =>
-      findService(() => new ClientLogService(currentHostAddress));
+	ClientLogService get clientLog =>
+	findService(() => new ClientLogService(currentHostAddress));
 
-  ConnectService get connect =>
-      findService(() => new ConnectService(currentHostAddress));
+	ConnectService get connect =>
+	findService(() => new ConnectService(currentHostAddress));
 
-  DeviceService get device =>
-      findService(() => new DeviceService(currentHostAddress));
+	DeviceService get device =>
+	findService(() => new DeviceService(currentHostAddress));
 
-  EmailService get email =>
-      findService(() => new EmailService(currentHostAddress));
+	EmailService get email =>
+	findService(() => new EmailService(currentHostAddress));
 
-  IdentityApplyService get identityApply =>
-      findService(() => new IdentityApplyService(currentHostAddress));
+	IdentityApplyService get identityApply =>
+	findService(() => new IdentityApplyService(currentHostAddress));
 
-  LoginService get login =>
-      findService(() => new LoginService(currentHostAddress));
+	LoginService get login =>
+	findService(() => new LoginService(currentHostAddress));
 
-  NotificationService get notification =>
-      findService(() => new NotificationService(currentHostAddress));
+	NotificationService get notification =>
+	findService(() => new NotificationService(currentHostAddress));
 
-  OrganizationService get organization =>
-      findService(() => new OrganizationService(currentHostAddress));
+	OrganizationService get organization =>
+	findService(() => new OrganizationService(currentHostAddress));
 
-  PatientService get patient =>
-      findService(() => new PatientService(currentHostAddress));
+	PatientService get patient =>
+	findService(() => new PatientService(currentHostAddress));
 
-  PositionService get position =>
-      findService(() => new PositionService(currentHostAddress));
+	PositionService get position =>
+	findService(() => new PositionService(currentHostAddress));
 
-  RankService get rank =>
-      findService(() => new RankService(currentHostAddress));
+	RankService get rank =>
+	findService(() => new RankService(currentHostAddress));
 
-  RecordInfoService get recordInfo =>
-      findService(() => new RecordInfoService(currentHostAddress));
+	RecordInfoService get recordInfo =>
+	findService(() => new RecordInfoService(currentHostAddress));
 
-  RegionService get region =>
-      findService(() => new RegionService(currentHostAddress));
+	RegionService get region =>
+	findService(() => new RegionService(currentHostAddress));
 
-  RemedicalService get remedical =>
-      findService(() => new RemedicalService(currentHostAddress));
+	RemedicalService get remedical =>
+	findService(() => new RemedicalService(currentHostAddress));
 
-  RoleService get role =>
-      findService(() => new RoleService(currentHostAddress));
+	RoleService get role =>
+	findService(() => new RoleService(currentHostAddress));
 
-  SMSService get sMS => findService(() => new SMSService(currentHostAddress));
+	SMSService get sMS =>
+	findService(() => new SMSService(currentHostAddress));
 
-  StorageService get storage =>
-      findService(() => new StorageService(currentHostAddress));
+	StorageService get storage =>
+	findService(() => new StorageService(currentHostAddress));
 
-  UserService get user =>
-      findService(() => new UserService(currentHostAddress));
+	UserService get user =>
+	findService(() => new UserService(currentHostAddress));
 
-  /* 服务代理设置 End */
+
+    /* 服务代理设置 End */
 
   /// 设置服务主机地址
   void setServerHost(String address) {
@@ -120,7 +119,7 @@ class JsonRpcProxy {
     }
     _currentHost = address;
   }
-
+  
   /// 添加拦截器
   void addInterceptor(JsonRpcInterceptor interceptor) =>
       jsonRpcInterceptHost.addInterceptor(interceptor);
@@ -137,3 +136,4 @@ class JsonRpcProxy {
     return _serviceCache[serviceType] as T;
   }
 }
+

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

@@ -39,7 +39,6 @@ class DeviceInfoDTO extends BaseDTO{
 	String? deviceModel;
 	String? deviceType;
 	String? headPicUrl;
-	String? headPicUrlToken;
 	String? deviceSoftwareVersion;
 	String? sDKSoftwareVersion;
 	String? organizationCode;
@@ -60,7 +59,6 @@ class DeviceInfoDTO extends BaseDTO{
 		this.deviceModel,
 		this.deviceType,
 		this.headPicUrl,
-		this.headPicUrlToken,
 		this.deviceSoftwareVersion,
 		this.sDKSoftwareVersion,
 		this.organizationCode,
@@ -88,7 +86,6 @@ class DeviceInfoDTO extends BaseDTO{
 			deviceModel: map['DeviceModel'],
 			deviceType: map['DeviceType'],
 			headPicUrl: map['HeadPicUrl'],
-			headPicUrlToken: map['HeadPicUrlToken'],
 			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
 			sDKSoftwareVersion: map['SDKSoftwareVersion'],
 			organizationCode: map['OrganizationCode'],
@@ -122,8 +119,6 @@ class DeviceInfoDTO extends BaseDTO{
 			map['DeviceType'] = deviceType;
 		if(headPicUrl != null)
 			map['HeadPicUrl'] = headPicUrl;
-		if(headPicUrlToken != null)
-			map['HeadPicUrlToken'] = headPicUrlToken;
 		if(deviceSoftwareVersion != null)
 			map['DeviceSoftwareVersion'] = deviceSoftwareVersion;
 		if(sDKSoftwareVersion != null)
@@ -250,7 +245,6 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 		String? deviceModel,
 		String? deviceType,
 		String? headPicUrl,
-		String? headPicUrlToken,
 		String? deviceSoftwareVersion,
 		String? sDKSoftwareVersion,
 		String? organizationCode,
@@ -272,7 +266,6 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 			deviceModel: deviceModel,
 			deviceType: deviceType,
 			headPicUrl: headPicUrl,
-			headPicUrlToken: headPicUrlToken,
 			deviceSoftwareVersion: deviceSoftwareVersion,
 			sDKSoftwareVersion: sDKSoftwareVersion,
 			organizationCode: organizationCode,
@@ -300,7 +293,6 @@ class DeviceExtendInfoDTO extends DeviceInfoDTO{
 			deviceModel: map['DeviceModel'],
 			deviceType: map['DeviceType'],
 			headPicUrl: map['HeadPicUrl'],
-			headPicUrlToken: map['HeadPicUrlToken'],
 			deviceSoftwareVersion: map['DeviceSoftwareVersion'],
 			sDKSoftwareVersion: map['SDKSoftwareVersion'],
 			organizationCode: map['OrganizationCode'],

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

@@ -14,8 +14,6 @@ class IdentityApplyDTO extends BaseDTO{
 	String? applyRoleCode;
 	List<String>? identityCard;
 	List<String>? licenseCard;
-	List<String>? licenseCardToken;
-	List<String>? identityCardToken;
 	ApplyStateEnum applyState;
 	String? applyNote;
 
@@ -25,8 +23,6 @@ class IdentityApplyDTO extends BaseDTO{
 		this.applyRoleCode,
 		this.identityCard,
 		this.licenseCard,
-		this.licenseCardToken,
-		this.identityCardToken,
 		this.applyState = ApplyStateEnum.NotApply,
 		this.applyNote,
 		DateTime? createTime,
@@ -43,8 +39,6 @@ class IdentityApplyDTO extends BaseDTO{
 			applyRoleCode: map['ApplyRoleCode'],
 			identityCard: map['IdentityCard'] != null ? map['IdentityCard'].cast<String>().toList() : null,
 			licenseCard: map['LicenseCard'] != null ? map['LicenseCard'].cast<String>().toList() : null,
-			licenseCardToken: map['LicenseCardToken'] != null ? map['LicenseCardToken'].cast<String>().toList() : null,
-			identityCardToken: map['IdentityCardToken'] != null ? map['IdentityCardToken'].cast<String>().toList() : null,
 			applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
 			applyNote: map['ApplyNote'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
@@ -64,10 +58,6 @@ class IdentityApplyDTO extends BaseDTO{
 			map['IdentityCard'] = identityCard;
 		if(licenseCard != null)
 			map['LicenseCard'] = licenseCard;
-		if(licenseCardToken != null)
-			map['LicenseCardToken'] = licenseCardToken;
-		if(identityCardToken != null)
-			map['IdentityCardToken'] = identityCardToken;
 		map['ApplyState'] = applyState.index;
 		if(applyNote != null)
 			map['ApplyNote'] = applyNote;

+ 5 - 0
lib/services/notification.dart

@@ -18,6 +18,11 @@ class NotificationService extends JsonRpcClientBase {
 						timeout: timeout,
 				);
 
+	Future<bool> addNotificationToQueue(SendNotificationRequest request) async {
+		var rpcRst = await call("AddNotificationToQueue", request);
+		return rpcRst;
+	}
+
 	Future<bool> subscribeNotify(SubscribeNotifyRequest request) async {
 		var rpcRst = await call("SubscribeNotify", request);
 		return rpcRst;

+ 27 - 26
lib/services/notification.m.dart

@@ -1,29 +1,3 @@
-class SubscribeNotifyRequest {
-	String? userCode;
-	String? token;
-
-	SubscribeNotifyRequest({
-		this.userCode,
-		this.token,
-	});
-
-	factory SubscribeNotifyRequest.fromJson(Map<String, dynamic> map) {
-		return SubscribeNotifyRequest( 
-			userCode: map['UserCode'],
-			token: map['Token'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(userCode != null)
-			map['UserCode'] = userCode;
-		if(token != null)
-			map['Token'] = token;
-		return map;
-	}
-}
-
 enum MessageTypeEnum {
 	Connection,
 	Disconnect,
@@ -38,6 +12,7 @@ enum NotificationTypeEnum {
 	Action,
 	Update,
 	NotifyRecordCodesMessage,
+	FinishNotifyRecordsMessage,
 }
 
 class NotifyMessage {
@@ -99,4 +74,30 @@ class SendNotificationRequest {
 	}
 }
 
+class SubscribeNotifyRequest {
+	String? userCode;
+	String? token;
+
+	SubscribeNotifyRequest({
+		this.userCode,
+		this.token,
+	});
+
+	factory SubscribeNotifyRequest.fromJson(Map<String, dynamic> map) {
+		return SubscribeNotifyRequest( 
+			userCode: map['UserCode'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		if(token != null)
+			map['Token'] = token;
+		return map;
+	}
+}
+
 

+ 13 - 0
lib/services/organization.dart

@@ -22,6 +22,7 @@ class OrganizationService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => OrganizationDTO.fromJson(map));
 		FJsonConvert.setDecoder((map) => OrganizationBaseDTO.fromJson(map));
 		FJsonConvert.setDecoder((map) => OrganizationBasicDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => OrganizationSettingResult.fromJson(map));
 	}
 
 	Future<List<OrganizationDTO>> searchOrganizations(SearchOrganizationsRequest request) async {
@@ -68,5 +69,17 @@ class OrganizationService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<OrganizationSettingResult> getOrganizationSetting(GetUserOrganizationSettingRequest request) async {
+		var rpcRst = await call("GetOrganizationSetting", request);
+		var result = OrganizationSettingResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<OrganizationSettingResult> getServerLangugeSetting(GetServerLangugeSettingRequest request) async {
+		var rpcRst = await call("GetServerLangugeSetting", request);
+		var result = OrganizationSettingResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
 }
 

+ 114 - 8
lib/services/organization.m.dart

@@ -43,14 +43,12 @@ class OrganizationBasicDTO extends OrganizationBaseDTO{
 	String? regionCode;
 	String? parentCode;
 	String? logoUrl;
-	String? logoUrlToken;
 	OrganizationPatientTypeEnum patientType;
 
 	OrganizationBasicDTO({
 		this.regionCode,
 		this.parentCode,
 		this.logoUrl,
-		this.logoUrlToken,
 		this.patientType = OrganizationPatientTypeEnum.Person,
 		String? organizationCode,
 		String? organizationName,
@@ -68,7 +66,6 @@ class OrganizationBasicDTO extends OrganizationBaseDTO{
 			regionCode: map['RegionCode'],
 			parentCode: map['ParentCode'],
 			logoUrl: map['LogoUrl'],
-			logoUrlToken: map['LogoUrlToken'],
 			patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
 			organizationCode: map['OrganizationCode'],
 			organizationName: map['OrganizationName'],
@@ -85,8 +82,6 @@ class OrganizationBasicDTO extends OrganizationBaseDTO{
 			map['ParentCode'] = parentCode;
 		if(logoUrl != null)
 			map['LogoUrl'] = logoUrl;
-		if(logoUrlToken != null)
-			map['LogoUrlToken'] = logoUrlToken;
 		map['PatientType'] = patientType.index;
 		return map;
 	}
@@ -113,6 +108,10 @@ class OrganizationDTO extends OrganizationBasicDTO{
 	OrganizationStateEnum state;
 	List<String>? directors;
 	List<String>? assignedAdmins;
+	String? patientSettingJson;
+	String? examSettingJson;
+	String? patientSettingVersion;
+	String? examSettingVersion;
 
 	OrganizationDTO({
 		this.description,
@@ -123,10 +122,13 @@ class OrganizationDTO extends OrganizationBasicDTO{
 		this.state = OrganizationStateEnum.WaitAudit,
 		this.directors,
 		this.assignedAdmins,
+		this.patientSettingJson,
+		this.examSettingJson,
+		this.patientSettingVersion,
+		this.examSettingVersion,
 		String? regionCode,
 		String? parentCode,
 		String? logoUrl,
-		String? logoUrlToken,
 		OrganizationPatientTypeEnum patientType = OrganizationPatientTypeEnum.Person,
 		String? organizationCode,
 		String? organizationName,
@@ -136,7 +138,6 @@ class OrganizationDTO extends OrganizationBasicDTO{
 			regionCode: regionCode,
 			parentCode: parentCode,
 			logoUrl: logoUrl,
-			logoUrlToken: logoUrlToken,
 			patientType: patientType,
 			organizationCode: organizationCode,
 			organizationName: organizationName,
@@ -154,10 +155,13 @@ class OrganizationDTO extends OrganizationBasicDTO{
 			state: OrganizationStateEnum.values.firstWhere((e) => e.index == map['State']),
 			directors: map['Directors'] != null ? map['Directors'].cast<String>().toList() : null,
 			assignedAdmins: map['AssignedAdmins'] != null ? map['AssignedAdmins'].cast<String>().toList() : null,
+			patientSettingJson: map['PatientSettingJson'],
+			examSettingJson: map['ExamSettingJson'],
+			patientSettingVersion: map['PatientSettingVersion'],
+			examSettingVersion: map['ExamSettingVersion'],
 			regionCode: map['RegionCode'],
 			parentCode: map['ParentCode'],
 			logoUrl: map['LogoUrl'],
-			logoUrlToken: map['LogoUrlToken'],
 			patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
 			organizationCode: map['OrganizationCode'],
 			organizationName: map['OrganizationName'],
@@ -182,6 +186,14 @@ class OrganizationDTO extends OrganizationBasicDTO{
 			map['Directors'] = directors;
 		if(assignedAdmins != null)
 			map['AssignedAdmins'] = assignedAdmins;
+		if(patientSettingJson != null)
+			map['PatientSettingJson'] = patientSettingJson;
+		if(examSettingJson != null)
+			map['ExamSettingJson'] = examSettingJson;
+		if(patientSettingVersion != null)
+			map['PatientSettingVersion'] = patientSettingVersion;
+		if(examSettingVersion != null)
+			map['ExamSettingVersion'] = examSettingVersion;
 		return map;
 	}
 }
@@ -442,4 +454,98 @@ class UpdateOrganizationNameRequest extends TokenRequest{
 	}
 }
 
+class OrganizationSettingResult {
+	String? settingVersion;
+	String? settingData;
+
+	OrganizationSettingResult({
+		this.settingVersion,
+		this.settingData,
+	});
+
+	factory OrganizationSettingResult.fromJson(Map<String, dynamic> map) {
+		return OrganizationSettingResult( 
+			settingVersion: map['SettingVersion'],
+			settingData: map['SettingData'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(settingVersion != null)
+			map['SettingVersion'] = settingVersion;
+		if(settingData != null)
+			map['SettingData'] = settingData;
+		return map;
+	}
+}
+
+enum OrganizationSettingTypeEnum {
+	Patient,
+	Exam,
+}
+
+class GetUserOrganizationSettingRequest extends TokenRequest{
+	OrganizationSettingTypeEnum settingType;
+	String? version;
+
+	GetUserOrganizationSettingRequest({
+		this.settingType = OrganizationSettingTypeEnum.Patient,
+		this.version,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetUserOrganizationSettingRequest.fromJson(Map<String, dynamic> map) {
+		return GetUserOrganizationSettingRequest( 
+			settingType: OrganizationSettingTypeEnum.values.firstWhere((e) => e.index == map['SettingType']),
+			version: map['Version'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['SettingType'] = settingType.index;
+		if(version != null)
+			map['Version'] = version;
+		return map;
+	}
+}
+
+enum ServerLangugeSettingEnum {
+	ZH,
+	EN,
+}
+
+class GetServerLangugeSettingRequest extends TokenRequest{
+	ServerLangugeSettingEnum settingType;
+	String? version;
+
+	GetServerLangugeSettingRequest({
+		this.settingType = ServerLangugeSettingEnum.ZH,
+		this.version,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory GetServerLangugeSettingRequest.fromJson(Map<String, dynamic> map) {
+		return GetServerLangugeSettingRequest( 
+			settingType: ServerLangugeSettingEnum.values.firstWhere((e) => e.index == map['SettingType']),
+			version: map['Version'],
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		map['SettingType'] = settingType.index;
+		if(version != null)
+			map['Version'] = version;
+		return map;
+	}
+}
+
 

+ 9 - 8
lib/services/patient.dart

@@ -19,8 +19,9 @@ class PatientService extends JsonRpcClientBase {
 						timeout: timeout,
 				) {
 		/// 注册响应实体反序列化处理器
-		FJsonConvert.setDecoder((map) => PageResult<PatientInfoBaseDTO>.fromJson(map));
-		FJsonConvert.setDecoder((map) => PatientInfoBaseDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => PageResult<ClientPatientInfoBaseDTO>.fromJson(map));
+		FJsonConvert.setDecoder((map) => ClientPatientInfoBaseDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => ClientPatientInfoDTO.fromJson(map));
 		FJsonConvert.setDecoder((map) => PatientInfoDTO.fromJson(map));
 	}
 
@@ -39,15 +40,15 @@ class PatientService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
-	Future<PageResult<PatientInfoBaseDTO>> findPatients(FindPatientsPageRequest request) async {
+	Future<PageResult<ClientPatientInfoBaseDTO>> findPatients(FindPatientsPageRequest request) async {
 		var rpcRst = await call("FindPatients", request);
-		var result = PageResult<PatientInfoBaseDTO>.fromJson(rpcRst as Map<String, dynamic>);
+		var result = PageResult<ClientPatientInfoBaseDTO>.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
-	Future<PatientInfoDTO> findPatientByCode(FindPatientByCodeRequest request) async {
+	Future<ClientPatientInfoDTO> findPatientByCode(FindPatientByCodeRequest request) async {
 		var rpcRst = await call("FindPatientByCode", request);
-		var result = PatientInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
+		var result = ClientPatientInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
 		return result;
 	}
 
@@ -57,9 +58,9 @@ class PatientService extends JsonRpcClientBase {
 		return result;
 	}
 
-	Future<List<PatientInfoBaseDTO>> findValidPatientsByName(FindValidPatientsByNameRequest request) async {
+	Future<List<ClientPatientInfoBaseDTO>> findValidPatientsByName(FindValidPatientsByNameRequest request) async {
 		var rpcRst = await call("FindValidPatientsByName", request);
-		var result = (rpcRst as List).map((e)=>PatientInfoBaseDTO.fromJson(e as Map<String, dynamic>)).toList();
+		var result = (rpcRst as List).map((e)=>ClientPatientInfoBaseDTO.fromJson(e as Map<String, dynamic>)).toList();
 		return result;
 	}
 

+ 182 - 102
lib/services/patient.m.dart

@@ -5,28 +5,38 @@ import 'package:fis_jsonrpc/utils.dart';
 
 import 'package:fis_common/json_convert.dart';
 
-enum PatientGenderEnum {
-	NotFilled,
-	Male,
-	Female,
+class DataItemDTO {
+	String? key;
+	String? value;
+
+	DataItemDTO({
+		this.key,
+		this.value,
+	});
+
+	factory DataItemDTO.fromJson(Map<String, dynamic> map) {
+		return DataItemDTO( 
+			key: map['Key'],
+			value: map['Value'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(key != null)
+			map['Key'] = key;
+		if(value != null)
+			map['Value'] = value;
+		return map;
+	}
 }
 
 class CreatePatientRequest extends TokenRequest{
-	String? name;
-	String? phone;
-	String? identityCard;
-	String? insuranceCode;
-	String? age;
-	PatientGenderEnum gender;
+	List<DataItemDTO>? patientData;
 	List<String>? assignmentUserCodes;
 
 	CreatePatientRequest({
-		this.name,
-		this.phone,
-		this.identityCard,
-		this.insuranceCode,
-		this.age,
-		this.gender = PatientGenderEnum.NotFilled,
+		this.patientData,
 		this.assignmentUserCodes,
 		String? token,
 	}) : super(
@@ -35,12 +45,7 @@ class CreatePatientRequest extends TokenRequest{
 
 	factory CreatePatientRequest.fromJson(Map<String, dynamic> map) {
 		return CreatePatientRequest( 
-			name: map['Name'],
-			phone: map['Phone'],
-			identityCard: map['IdentityCard'],
-			insuranceCode: map['InsuranceCode'],
-			age: map['Age'],
-			gender: PatientGenderEnum.values.firstWhere((e) => e.index == map['Gender']),
+			patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
@@ -48,17 +53,8 @@ class CreatePatientRequest extends TokenRequest{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(name != null)
-			map['Name'] = name;
-		if(phone != null)
-			map['Phone'] = phone;
-		if(identityCard != null)
-			map['IdentityCard'] = identityCard;
-		if(insuranceCode != null)
-			map['InsuranceCode'] = insuranceCode;
-		if(age != null)
-			map['Age'] = age;
-		map['Gender'] = gender.index;
+		if(patientData != null)
+			map['PatientData'] = patientData;
 		if(assignmentUserCodes != null)
 			map['AssignmentUserCodes'] = assignmentUserCodes;
 		return map;
@@ -67,22 +63,12 @@ class CreatePatientRequest extends TokenRequest{
 
 class UpdatePatientRequest extends TokenRequest{
 	String? code;
-	String? name;
-	String? phone;
-	String? identityCard;
-	String? insuranceCode;
-	String? age;
-	PatientGenderEnum gender;
+	List<DataItemDTO>? patientData;
 	List<String>? assignmentUserCodes;
 
 	UpdatePatientRequest({
 		this.code,
-		this.name,
-		this.phone,
-		this.identityCard,
-		this.insuranceCode,
-		this.age,
-		this.gender = PatientGenderEnum.NotFilled,
+		this.patientData,
 		this.assignmentUserCodes,
 		String? token,
 	}) : super(
@@ -92,12 +78,7 @@ class UpdatePatientRequest extends TokenRequest{
 	factory UpdatePatientRequest.fromJson(Map<String, dynamic> map) {
 		return UpdatePatientRequest( 
 			code: map['Code'],
-			name: map['Name'],
-			phone: map['Phone'],
-			identityCard: map['IdentityCard'],
-			insuranceCode: map['InsuranceCode'],
-			age: map['Age'],
-			gender: PatientGenderEnum.values.firstWhere((e) => e.index == map['Gender']),
+			patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
 			token: map['Token'],
 		);
@@ -107,17 +88,8 @@ class UpdatePatientRequest extends TokenRequest{
 		final map = super.toJson();
 		if(code != null)
 			map['Code'] = code;
-		if(name != null)
-			map['Name'] = name;
-		if(phone != null)
-			map['Phone'] = phone;
-		if(identityCard != null)
-			map['IdentityCard'] = identityCard;
-		if(insuranceCode != null)
-			map['InsuranceCode'] = insuranceCode;
-		if(age != null)
-			map['Age'] = age;
-		map['Gender'] = gender.index;
+		if(patientData != null)
+			map['PatientData'] = patientData;
 		if(assignmentUserCodes != null)
 			map['AssignmentUserCodes'] = assignmentUserCodes;
 		return map;
@@ -131,13 +103,11 @@ class PatientInfoBaseDTO extends BaseDTO{
 	String? identityCard;
 	String? insuranceCode;
 	String? age;
-	PatientGenderEnum gender;
+	int gender;
 	bool isValid;
 	String? organizationCode;
 	List<String>? assignmentUserCodes;
-	DateTime? birthday;
-	String? height;
-	String? weight;
+	List<DataItemDTO>? patientData;
 	int unReadRecordCount;
 
 	PatientInfoBaseDTO({
@@ -147,13 +117,11 @@ class PatientInfoBaseDTO extends BaseDTO{
 		this.identityCard,
 		this.insuranceCode,
 		this.age,
-		this.gender = PatientGenderEnum.NotFilled,
+		this.gender = 0,
 		this.isValid = false,
 		this.organizationCode,
 		this.assignmentUserCodes,
-		this.birthday,
-		this.height,
-		this.weight,
+		this.patientData,
 		this.unReadRecordCount = 0,
 		DateTime? createTime,
 		DateTime? updateTime,
@@ -170,13 +138,11 @@ class PatientInfoBaseDTO extends BaseDTO{
 			identityCard: map['IdentityCard'],
 			insuranceCode: map['InsuranceCode'],
 			age: map['Age'],
-			gender: PatientGenderEnum.values.firstWhere((e) => e.index == map['Gender']),
+			gender: map['Gender'],
 			isValid: map['IsValid'],
 			organizationCode: map['OrganizationCode'],
 			assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
-			birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
-			height: map['Height'],
-			weight: map['Weight'],
+			patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			unReadRecordCount: map['UnReadRecordCount'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
@@ -197,33 +163,25 @@ class PatientInfoBaseDTO extends BaseDTO{
 			map['InsuranceCode'] = insuranceCode;
 		if(age != null)
 			map['Age'] = age;
-		map['Gender'] = gender.index;
+		map['Gender'] = gender;
 		map['IsValid'] = isValid;
 		if(organizationCode != null)
 			map['OrganizationCode'] = organizationCode;
 		if(assignmentUserCodes != null)
 			map['AssignmentUserCodes'] = assignmentUserCodes;
-		if(birthday != null)
-			map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
-		if(height != null)
-			map['Height'] = height;
-		if(weight != null)
-			map['Weight'] = weight;
+		if(patientData != null)
+			map['PatientData'] = patientData;
 		map['UnReadRecordCount'] = unReadRecordCount;
 		return map;
 	}
 }
 
 class PatientInfoDTO extends PatientInfoBaseDTO{
-	List<String>? recordCodes;
 	String? creatorCode;
-	String? sourceCode;
 	String? deviceCode;
 
 	PatientInfoDTO({
-		this.recordCodes,
 		this.creatorCode,
-		this.sourceCode,
 		this.deviceCode,
 		String? patientCode,
 		String? name,
@@ -231,13 +189,11 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 		String? identityCard,
 		String? insuranceCode,
 		String? age,
-		PatientGenderEnum gender = PatientGenderEnum.NotFilled,
+		int gender = 0,
 		bool isValid = false,
 		String? organizationCode,
 		List<String>? assignmentUserCodes,
-		DateTime? birthday,
-		String? height,
-		String? weight,
+		List<DataItemDTO>? patientData,
 		int unReadRecordCount = 0,
 		DateTime? createTime,
 		DateTime? updateTime,
@@ -252,9 +208,7 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 			isValid: isValid,
 			organizationCode: organizationCode,
 			assignmentUserCodes: assignmentUserCodes,
-			birthday: birthday,
-			height: height,
-			weight: weight,
+			patientData: patientData,
 			unReadRecordCount: unReadRecordCount,
 			createTime: createTime,
 			updateTime: updateTime,
@@ -262,9 +216,7 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 
 	factory PatientInfoDTO.fromJson(Map<String, dynamic> map) {
 		return PatientInfoDTO( 
-			recordCodes: map['RecordCodes'] != null ? map['RecordCodes'].cast<String>().toList() : null,
 			creatorCode: map['CreatorCode'],
-			sourceCode: map['SourceCode'],
 			deviceCode: map['DeviceCode'],
 			patientCode: map['PatientCode'],
 			name: map['Name'],
@@ -272,13 +224,11 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 			identityCard: map['IdentityCard'],
 			insuranceCode: map['InsuranceCode'],
 			age: map['Age'],
-			gender: PatientGenderEnum.values.firstWhere((e) => e.index == map['Gender']),
+			gender: map['Gender'],
 			isValid: map['IsValid'],
 			organizationCode: map['OrganizationCode'],
 			assignmentUserCodes: map['AssignmentUserCodes'] != null ? map['AssignmentUserCodes'].cast<String>().toList() : null,
-			birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
-			height: map['Height'],
-			weight: map['Weight'],
+			patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 			unReadRecordCount: map['UnReadRecordCount'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
@@ -287,12 +237,8 @@ class PatientInfoDTO extends PatientInfoBaseDTO{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(recordCodes != null)
-			map['RecordCodes'] = recordCodes;
 		if(creatorCode != null)
 			map['CreatorCode'] = creatorCode;
-		if(sourceCode != null)
-			map['SourceCode'] = sourceCode;
 		if(deviceCode != null)
 			map['DeviceCode'] = deviceCode;
 		return map;
@@ -324,6 +270,47 @@ class CreatePatientsRequest extends TokenRequest{
 	}
 }
 
+class ClientPatientInfoBaseDTO extends BaseDTO{
+	String? patientCode;
+	bool isValid;
+	List<DataItemDTO>? patientData;
+	int unReadRecordCount;
+
+	ClientPatientInfoBaseDTO({
+		this.patientCode,
+		this.isValid = false,
+		this.patientData,
+		this.unReadRecordCount = 0,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory ClientPatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
+		return ClientPatientInfoBaseDTO( 
+			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'],
+			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(patientCode != null)
+			map['PatientCode'] = patientCode;
+		map['IsValid'] = isValid;
+		if(patientData != null)
+			map['PatientData'] = patientData;
+		map['UnReadRecordCount'] = unReadRecordCount;
+		return map;
+	}
+}
+
 class PageResult<T> {
 	int pageIndex;
 	int pageSize;
@@ -441,6 +428,99 @@ class FindPatientsPageRequest extends PageRequest{
 	}
 }
 
+class UserBaseDTO extends BaseDTO{
+	String? userCode;
+	String? userName;
+	String? headImageUrl;
+
+	UserBaseDTO({
+		this.userCode,
+		this.userName,
+		this.headImageUrl,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory UserBaseDTO.fromJson(Map<String, dynamic> map) {
+		return UserBaseDTO( 
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			headImageUrl: map['HeadImageUrl'],
+			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(userCode != null)
+			map['UserCode'] = userCode;
+		if(userName != null)
+			map['UserName'] = userName;
+		if(headImageUrl != null)
+			map['HeadImageUrl'] = headImageUrl;
+		return map;
+	}
+}
+
+class ClientPatientInfoDTO extends ClientPatientInfoBaseDTO{
+	String? creatorCode;
+	String? creatorName;
+	String? deviceCode;
+	List<UserBaseDTO>? assignmentUserList;
+
+	ClientPatientInfoDTO({
+		this.creatorCode,
+		this.creatorName,
+		this.deviceCode,
+		this.assignmentUserList,
+		String? patientCode,
+		bool isValid = false,
+		List<DataItemDTO>? patientData,
+		int unReadRecordCount = 0,
+		DateTime? createTime,
+		DateTime? updateTime,
+	}) : super(
+			patientCode: patientCode,
+			isValid: isValid,
+			patientData: patientData,
+			unReadRecordCount: unReadRecordCount,
+			createTime: createTime,
+			updateTime: updateTime,
+		);
+
+	factory ClientPatientInfoDTO.fromJson(Map<String, dynamic> map) {
+		return ClientPatientInfoDTO( 
+			creatorCode: map['CreatorCode'],
+			creatorName: map['CreatorName'],
+			deviceCode: map['DeviceCode'],
+			assignmentUserList: map['AssignmentUserList'] != null ? (map['AssignmentUserList'] as List).map((e)=>UserBaseDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			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'],
+			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(creatorCode != null)
+			map['CreatorCode'] = creatorCode;
+		if(creatorName != null)
+			map['CreatorName'] = creatorName;
+		if(deviceCode != null)
+			map['DeviceCode'] = deviceCode;
+		if(assignmentUserList != null)
+			map['AssignmentUserList'] = assignmentUserList;
+		return map;
+	}
+}
+
 class FindPatientByCodeRequest extends TokenRequest{
 	String? code;
 

+ 10 - 0
lib/services/recordInfo.dart

@@ -54,5 +54,15 @@ class RecordInfoService extends JsonRpcClientBase {
 		return rpcRst;
 	}
 
+	Future<bool> pushFinshExamNotificationToClientAsync(PushFinishExamNotifyToClientRequest request) async {
+		var rpcRst = await call("PushFinshExamNotificationToClientAsync", request);
+		return rpcRst;
+	}
+
+	Future<bool> deviceFinishExamAsync(DeviceFinishExamRequest request) async {
+		var rpcRst = await call("DeviceFinishExamAsync", request);
+		return rpcRst;
+	}
+
 }
 

+ 82 - 60
lib/services/recordInfo.m.dart

@@ -1,63 +1,9 @@
 import 'authentication.m.dart';
 import 'patient.m.dart';
 
-class DataItemDTO {
-	String? key;
-	String? value;
-
-	DataItemDTO({
-		this.key,
-		this.value,
-	});
-
-	factory DataItemDTO.fromJson(Map<String, dynamic> map) {
-		return DataItemDTO( 
-			key: map['Key'],
-			value: map['Value'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(key != null)
-			map['Key'] = key;
-		if(value != null)
-			map['Value'] = value;
-		return map;
-	}
-}
-
-class TypeDataItemDTO extends DataItemDTO{
-	String? type;
-
-	TypeDataItemDTO({
-		this.type,
-		String? key,
-		String? value,
-	}) : super(
-			key: key,
-			value: value,
-		);
-
-	factory TypeDataItemDTO.fromJson(Map<String, dynamic> map) {
-		return TypeDataItemDTO( 
-			type: map['Type'],
-			key: map['Key'],
-			value: map['Value'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = super.toJson();
-		if(type != null)
-			map['Type'] = type;
-		return map;
-	}
-}
-
 class PatientInfoExt {
 	String? patientScanType;
-	List<TypeDataItemDTO>? content;
+	List<DataItemDTO>? content;
 
 	PatientInfoExt({
 		this.patientScanType,
@@ -67,7 +13,7 @@ class PatientInfoExt {
 	factory PatientInfoExt.fromJson(Map<String, dynamic> map) {
 		return PatientInfoExt( 
 			patientScanType: map['PatientScanType'],
-			content: map['Content'] != null ? (map['Content'] as List).map((e)=>TypeDataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
 		);
 	}
 
@@ -212,7 +158,7 @@ class QueryRecordResult {
 	String? deptName;
 	String? patientName;
 	String? patientAge;
-	PatientGenderEnum patientSex;
+	int patientSex;
 	String? creatorName;
 	String? deviceName;
 	RecordStatusEnum recordStatus;
@@ -223,7 +169,7 @@ class QueryRecordResult {
 		this.deptName,
 		this.patientName,
 		this.patientAge,
-		this.patientSex = PatientGenderEnum.NotFilled,
+		this.patientSex = 0,
 		this.creatorName,
 		this.deviceName,
 		this.recordStatus = RecordStatusEnum.NotScanned,
@@ -236,7 +182,7 @@ class QueryRecordResult {
 			deptName: map['DeptName'],
 			patientName: map['PatientName'],
 			patientAge: map['PatientAge'],
-			patientSex: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientSex']),
+			patientSex: map['PatientSex'],
 			creatorName: map['CreatorName'],
 			deviceName: map['DeviceName'],
 			recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
@@ -254,7 +200,7 @@ class QueryRecordResult {
 			map['PatientName'] = patientName;
 		if(patientAge != null)
 			map['PatientAge'] = patientAge;
-		map['PatientSex'] = patientSex.index;
+		map['PatientSex'] = patientSex;
 		if(creatorName != null)
 			map['CreatorName'] = creatorName;
 		if(deviceName != null)
@@ -321,4 +267,80 @@ class PushRecordCodesToDeviceRequest extends TokenRequest{
 	}
 }
 
+class FinishExamNotifyDetail {
+	String? recordCode;
+	RecordStatusEnum recordStatus;
+
+	FinishExamNotifyDetail({
+		this.recordCode,
+		this.recordStatus = RecordStatusEnum.NotScanned,
+	});
+
+	factory FinishExamNotifyDetail.fromJson(Map<String, dynamic> map) {
+		return FinishExamNotifyDetail( 
+			recordCode: map['RecordCode'],
+			recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(recordCode != null)
+			map['RecordCode'] = recordCode;
+		map['RecordStatus'] = recordStatus.index;
+		return map;
+	}
+}
+
+class PushFinishExamNotifyToClientRequest {
+	List<FinishExamNotifyDetail>? records;
+	String? userCode;
+
+	PushFinishExamNotifyToClientRequest({
+		this.records,
+		this.userCode,
+	});
+
+	factory PushFinishExamNotifyToClientRequest.fromJson(Map<String, dynamic> map) {
+		return PushFinishExamNotifyToClientRequest( 
+			records: map['Records'] != null ? (map['Records'] as List).map((e)=>FinishExamNotifyDetail.fromJson(e as Map<String,dynamic>)).toList() : null,
+			userCode: map['UserCode'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(records != null)
+			map['Records'] = records;
+		if(userCode != null)
+			map['UserCode'] = userCode;
+		return map;
+	}
+}
+
+class DeviceFinishExamRequest extends TokenRequest{
+	List<String>? records;
+
+	DeviceFinishExamRequest({
+		this.records,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory DeviceFinishExamRequest.fromJson(Map<String, dynamic> map) {
+		return DeviceFinishExamRequest( 
+			records: map['Records'] != null ? map['Records'].cast<String>().toList() : null,
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(records != null)
+			map['Records'] = records;
+		return map;
+	}
+}
+
 

+ 15 - 0
lib/services/remedical.dart

@@ -6,6 +6,7 @@ import 'package:fis_common/json_convert.dart';
 import 'remedical.m.dart';
 
 import 'recordInfo.m.dart';
+import 'organization.m.dart';
 import 'patient.m.dart';
 
 
@@ -26,6 +27,8 @@ class RemedicalService extends JsonRpcClientBase {
 		FJsonConvert.setDecoder((map) => RemedicalListResult.fromJson(map));
 		FJsonConvert.setDecoder((map) => PageResult<RemedicalListResult>.fromJson(map));
 		FJsonConvert.setDecoder((map) => DataItemDTO.fromJson(map));
+		FJsonConvert.setDecoder((map) => OrganizationSettingResult.fromJson(map));
+		FJsonConvert.setDecoder((map) => QueryReservationResult.fromJson(map));
 	}
 
 	Future<CreateExaminfoResult> createExamInfo(CreateExaminfoRequest request) async {
@@ -57,5 +60,17 @@ class RemedicalService extends JsonRpcClientBase {
 		return result;
 	}
 
+	Future<OrganizationSettingResult> getOrganizationSetting(GetUserOrganizationSettingRequest request) async {
+		var rpcRst = await call("GetOrganizationSetting", request);
+		var result = OrganizationSettingResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
+	Future<QueryReservationResult> queryReservation(QueryReservationRequest request) async {
+		var rpcRst = await call("QueryReservation", request);
+		var result = QueryReservationResult.fromJson(rpcRst as Map<String, dynamic>);
+		return result;
+	}
+
 }
 

+ 90 - 76
lib/services/remedical.m.dart

@@ -2,6 +2,7 @@ import 'authentication.m.dart';
 import 'patient.m.dart';
 import 'recordInfo.m.dart';
 import 'device.m.dart';
+import 'organization.m.dart';
 
 import 'package:fis_jsonrpc/utils.dart';
 
@@ -26,83 +27,17 @@ class CreateExaminfoResult {
 	}
 }
 
-class ExamPatientDTO {
-	String? iD;
-	String? name;
-	String? phone;
-	String? identityCard;
-	String? insuranceCode;
-	DateTime? birthday;
-	int age;
-	PatientGenderEnum gender;
-	String? height;
-	String? weight;
-
-	ExamPatientDTO({
-		this.iD,
-		this.name,
-		this.phone,
-		this.identityCard,
-		this.insuranceCode,
-		this.birthday,
-		this.age = 0,
-		this.gender = PatientGenderEnum.NotFilled,
-		this.height,
-		this.weight,
-	});
-
-	factory ExamPatientDTO.fromJson(Map<String, dynamic> map) {
-		return ExamPatientDTO( 
-			iD: map['ID'],
-			name: map['Name'],
-			phone: map['Phone'],
-			identityCard: map['IdentityCard'],
-			insuranceCode: map['InsuranceCode'],
-			birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
-			age: map['Age'],
-			gender: PatientGenderEnum.values.firstWhere((e) => e.index == map['Gender']),
-			height: map['Height'],
-			weight: map['Weight'],
-		);
-	}
-
-	Map<String, dynamic> toJson() {
-		final map = Map<String, dynamic>();
-		if(iD != null)
-			map['ID'] = iD;
-		if(name != null)
-			map['Name'] = name;
-		if(phone != null)
-			map['Phone'] = phone;
-		if(identityCard != null)
-			map['IdentityCard'] = identityCard;
-		if(insuranceCode != null)
-			map['InsuranceCode'] = insuranceCode;
-		if(birthday != null)
-			map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
-		map['Age'] = age;
-		map['Gender'] = gender.index;
-		if(height != null)
-			map['Height'] = height;
-		if(weight != null)
-			map['Weight'] = weight;
-		return map;
-	}
-}
-
 class CreateExaminfoRequest extends TokenRequest{
 	String? patientType;
-	String? subPatientType;
 	String? reservationCode;
-	ExamPatientDTO? patientInfo;
-	List<PatientInfoExt>? patientInfoExtList;
+	List<DataItemDTO>? patientInfo;
+	List<PatientInfoExt>? patientScanInfoList;
 
 	CreateExaminfoRequest({
 		this.patientType,
-		this.subPatientType,
 		this.reservationCode,
 		this.patientInfo,
-		this.patientInfoExtList,
+		this.patientScanInfoList,
 		String? token,
 	}) : super(
 			token: token,
@@ -111,10 +46,9 @@ class CreateExaminfoRequest extends TokenRequest{
 	factory CreateExaminfoRequest.fromJson(Map<String, dynamic> map) {
 		return CreateExaminfoRequest( 
 			patientType: map['PatientType'],
-			subPatientType: map['SubPatientType'],
 			reservationCode: map['ReservationCode'],
-			patientInfo: map['PatientInfo'],
-			patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
+			patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
 			token: map['Token'],
 		);
 	}
@@ -123,14 +57,12 @@ class CreateExaminfoRequest extends TokenRequest{
 		final map = super.toJson();
 		if(patientType != null)
 			map['PatientType'] = patientType;
-		if(subPatientType != null)
-			map['SubPatientType'] = subPatientType;
 		if(reservationCode != null)
 			map['ReservationCode'] = reservationCode;
 		if(patientInfo != null)
 			map['PatientInfo'] = patientInfo;
-		if(patientInfoExtList != null)
-			map['PatientInfoExtList'] = patientInfoExtList;
+		if(patientScanInfoList != null)
+			map['PatientScanInfoList'] = patientScanInfoList;
 		return map;
 	}
 }
@@ -437,4 +369,86 @@ class QueryDropdownListReuqest extends TokenRequest{
 	}
 }
 
+class RservationResult {
+	String? reservationCode;
+	List<DataItemDTO>? patientInfo;
+	List<PatientInfoExt>? patientInfoExtList;
+	String? dataSource;
+
+	RservationResult({
+		this.reservationCode,
+		this.patientInfo,
+		this.patientInfoExtList,
+		this.dataSource,
+	});
+
+	factory RservationResult.fromJson(Map<String, dynamic> map) {
+		return RservationResult( 
+			reservationCode: map['ReservationCode'],
+			patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
+			patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
+			dataSource: map['DataSource'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(reservationCode != null)
+			map['ReservationCode'] = reservationCode;
+		if(patientInfo != null)
+			map['PatientInfo'] = patientInfo;
+		if(patientInfoExtList != null)
+			map['PatientInfoExtList'] = patientInfoExtList;
+		if(dataSource != null)
+			map['DataSource'] = dataSource;
+		return map;
+	}
+}
+
+class QueryReservationResult {
+	List<RservationResult>? reservationList;
+
+	QueryReservationResult({
+		this.reservationList,
+	});
+
+	factory QueryReservationResult.fromJson(Map<String, dynamic> map) {
+		return QueryReservationResult( 
+			reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map<String,dynamic>)).toList() : null,
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = Map<String, dynamic>();
+		if(reservationList != null)
+			map['ReservationList'] = reservationList;
+		return map;
+	}
+}
+
+class QueryReservationRequest extends TokenRequest{
+	DateTime? createTime;
+
+	QueryReservationRequest({
+		this.createTime,
+		String? token,
+	}) : super(
+			token: token,
+		);
+
+	factory QueryReservationRequest.fromJson(Map<String, dynamic> map) {
+		return QueryReservationRequest( 
+			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
+			token: map['Token'],
+		);
+	}
+
+	Map<String, dynamic> toJson() {
+		final map = super.toJson();
+		if(createTime != null)
+			map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
+		return map;
+	}
+}
+
 

+ 0 - 5
lib/services/role.m.dart

@@ -54,7 +54,6 @@ enum RoleQualificationEnum {
 class RoleDTO extends BaseRoleDTO{
 	RoleShowTypeEnum roleShowType;
 	String? iConUrl;
-	String? iConUrlToken;
 	String? colorStart;
 	String? colorEnd;
 	RoleQualificationEnum roleQualification;
@@ -63,7 +62,6 @@ class RoleDTO extends BaseRoleDTO{
 	RoleDTO({
 		this.roleShowType = RoleShowTypeEnum.NotShow,
 		this.iConUrl,
-		this.iConUrlToken,
 		this.colorStart,
 		this.colorEnd,
 		this.roleQualification = RoleQualificationEnum.NoNeed,
@@ -85,7 +83,6 @@ class RoleDTO extends BaseRoleDTO{
 		return RoleDTO( 
 			roleShowType: RoleShowTypeEnum.values.firstWhere((e) => e.index == map['RoleShowType']),
 			iConUrl: map['IConUrl'],
-			iConUrlToken: map['IConUrlToken'],
 			colorStart: map['ColorStart'],
 			colorEnd: map['ColorEnd'],
 			roleQualification: RoleQualificationEnum.values.firstWhere((e) => e.index == map['RoleQualification']),
@@ -103,8 +100,6 @@ class RoleDTO extends BaseRoleDTO{
 		map['RoleShowType'] = roleShowType.index;
 		if(iConUrl != null)
 			map['IConUrl'] = iConUrl;
-		if(iConUrlToken != null)
-			map['IConUrlToken'] = iConUrlToken;
 		if(colorStart != null)
 			map['ColorStart'] = colorStart;
 		if(colorEnd != null)

+ 11 - 27
lib/services/user.m.dart

@@ -1,22 +1,18 @@
 import 'device.m.dart';
+import 'patient.m.dart';
 import 'identityApply.m.dart';
 import 'authentication.m.dart';
-import 'patient.m.dart';
 
 enum UserInfoStateEnum {
 	Nonactivated,
 	Activated,
 }
 
-class UserDTO extends BaseDTO{
-	String? userCode;
-	String? userName;
+class UserDTO extends UserBaseDTO{
 	String? phone;
 	String? email;
 	String? nickName;
 	String? fullName;
-	String? headImageUrl;
-	String? headImageUrlToken;
 	String? organizationCode;
 	String? rootOrganizationCode;
 	List<String>? authorityGroups;
@@ -33,14 +29,10 @@ class UserDTO extends BaseDTO{
 	bool isDirector;
 
 	UserDTO({
-		this.userCode,
-		this.userName,
 		this.phone,
 		this.email,
 		this.nickName,
 		this.fullName,
-		this.headImageUrl,
-		this.headImageUrlToken,
 		this.organizationCode,
 		this.rootOrganizationCode,
 		this.authorityGroups,
@@ -55,23 +47,25 @@ class UserDTO extends BaseDTO{
 		this.rankName,
 		this.positionName,
 		this.isDirector = false,
+		String? userCode,
+		String? userName,
+		String? headImageUrl,
 		DateTime? createTime,
 		DateTime? updateTime,
 	}) : super(
+			userCode: userCode,
+			userName: userName,
+			headImageUrl: headImageUrl,
 			createTime: createTime,
 			updateTime: updateTime,
 		);
 
 	factory UserDTO.fromJson(Map<String, dynamic> map) {
 		return UserDTO( 
-			userCode: map['UserCode'],
-			userName: map['UserName'],
 			phone: map['Phone'],
 			email: map['Email'],
 			nickName: map['NickName'],
 			fullName: map['FullName'],
-			headImageUrl: map['HeadImageUrl'],
-			headImageUrlToken: map['HeadImageUrlToken'],
 			organizationCode: map['OrganizationCode'],
 			rootOrganizationCode: map['RootOrganizationCode'],
 			authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
@@ -86,6 +80,9 @@ class UserDTO extends BaseDTO{
 			rankName: map['RankName'],
 			positionName: map['PositionName'],
 			isDirector: map['IsDirector'],
+			userCode: map['UserCode'],
+			userName: map['UserName'],
+			headImageUrl: map['HeadImageUrl'],
 			createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
 			updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
 		);
@@ -93,10 +90,6 @@ class UserDTO extends BaseDTO{
 
 	Map<String, dynamic> toJson() {
 		final map = super.toJson();
-		if(userCode != null)
-			map['UserCode'] = userCode;
-		if(userName != null)
-			map['UserName'] = userName;
 		if(phone != null)
 			map['Phone'] = phone;
 		if(email != null)
@@ -105,10 +98,6 @@ class UserDTO extends BaseDTO{
 			map['NickName'] = nickName;
 		if(fullName != null)
 			map['FullName'] = fullName;
-		if(headImageUrl != null)
-			map['HeadImageUrl'] = headImageUrl;
-		if(headImageUrlToken != null)
-			map['HeadImageUrlToken'] = headImageUrlToken;
 		if(organizationCode != null)
 			map['OrganizationCode'] = organizationCode;
 		if(rootOrganizationCode != null)
@@ -377,7 +366,6 @@ class ShareDeviceUserDTO extends BaseDTO{
 	String? fullName;
 	String? phone;
 	String? headImageUrl;
-	String? headImageUrlToken;
 	List<String>? rankNames;
 	String? rootOrganizationCode;
 	String? rootOrganizationName;
@@ -387,7 +375,6 @@ class ShareDeviceUserDTO extends BaseDTO{
 		this.fullName,
 		this.phone,
 		this.headImageUrl,
-		this.headImageUrlToken,
 		this.rankNames,
 		this.rootOrganizationCode,
 		this.rootOrganizationName,
@@ -404,7 +391,6 @@ class ShareDeviceUserDTO extends BaseDTO{
 			fullName: map['FullName'],
 			phone: map['Phone'],
 			headImageUrl: map['HeadImageUrl'],
-			headImageUrlToken: map['HeadImageUrlToken'],
 			rankNames: map['RankNames'] != null ? map['RankNames'].cast<String>().toList() : null,
 			rootOrganizationCode: map['RootOrganizationCode'],
 			rootOrganizationName: map['RootOrganizationName'],
@@ -423,8 +409,6 @@ class ShareDeviceUserDTO extends BaseDTO{
 			map['Phone'] = phone;
 		if(headImageUrl != null)
 			map['HeadImageUrl'] = headImageUrl;
-		if(headImageUrlToken != null)
-			map['HeadImageUrlToken'] = headImageUrlToken;
 		if(rankNames != null)
 			map['RankNames'] = rankNames;
 		if(rootOrganizationCode != null)