123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191 |
- import 'aIDiagnosis.m.dart';
- import 'connect.m.dart';
- import 'authentication.m.dart';
- import 'package:fis_jsonrpc/utils.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 CreatePatientRequest extends TokenRequest{
- List<DataItemDTO >? patientData;
- List<String >? assignmentUserCodes;
- CreatePatientRequest({
- this.patientData,
- this.assignmentUserCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory CreatePatientRequest.fromJson(Map<String, dynamic> map) {
- return CreatePatientRequest(
- 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'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientData != null)
- map['PatientData'] = patientData;
- if(assignmentUserCodes != null)
- map['AssignmentUserCodes'] = assignmentUserCodes;
- return map;
- }
- }
- class CreatePatientByUnregisteredRequest extends TokenRequest{
- String? unregisteredPatientCode;
- String? patientName;
- CreatePatientByUnregisteredRequest({
- this.unregisteredPatientCode,
- this.patientName,
- String? token,
- }) : super(
- token: token,
- );
- factory CreatePatientByUnregisteredRequest.fromJson(Map<String, dynamic> map) {
- return CreatePatientByUnregisteredRequest(
- unregisteredPatientCode: map['UnregisteredPatientCode'],
- patientName: map['PatientName'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(unregisteredPatientCode != null)
- map['UnregisteredPatientCode'] = unregisteredPatientCode;
- if(patientName != null)
- map['PatientName'] = patientName;
- return map;
- }
- }
- class UpdatePatientRequest extends TokenRequest{
- String? code;
- List<DataItemDTO >? patientData;
- List<String >? assignmentUserCodes;
- UpdatePatientRequest({
- this.code,
- this.patientData,
- this.assignmentUserCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdatePatientRequest.fromJson(Map<String, dynamic> map) {
- return UpdatePatientRequest(
- code: map['Code'],
- 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'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(patientData != null)
- map['PatientData'] = patientData;
- if(assignmentUserCodes != null)
- map['AssignmentUserCodes'] = assignmentUserCodes;
- return map;
- }
- }
- class PatientInfoBaseDTO extends BaseDTO{
- String? patientCode;
- String? name;
- String? phone;
- String? identityCard;
- String? insuranceCode;
- String? age;
- int gender;
- bool isValid;
- String? organizationCode;
- String? rootOrganizationCode;
- List<String >? assignmentUserCodes;
- List<DataItemDTO >? patientData;
- int unReadRecordCount;
- String? headImgUrl;
- String? patientType;
- bool isReferral;
- PatientInfoBaseDTO({
- this.patientCode,
- this.name,
- this.phone,
- this.identityCard,
- this.insuranceCode,
- this.age,
- this.gender = 0,
- this.isValid = false,
- this.organizationCode,
- this.rootOrganizationCode,
- this.assignmentUserCodes,
- this.patientData,
- this.unReadRecordCount = 0,
- this.headImgUrl,
- this.patientType,
- this.isReferral = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory PatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
- return PatientInfoBaseDTO(
- patientCode: map['PatientCode'],
- name: map['Name'],
- phone: map['Phone'],
- identityCard: map['IdentityCard'],
- insuranceCode: map['InsuranceCode'],
- age: map['Age'],
- 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'],
- headImgUrl: map['HeadImgUrl'],
- patientType: map['PatientType'],
- 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(patientCode != null)
- map['PatientCode'] = patientCode;
- 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;
- map['IsValid'] = isValid;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(rootOrganizationCode != null)
- map['RootOrganizationCode'] = rootOrganizationCode;
- if(assignmentUserCodes != null)
- map['AssignmentUserCodes'] = assignmentUserCodes;
- if(patientData != null)
- map['PatientData'] = patientData;
- map['UnReadRecordCount'] = unReadRecordCount;
- if(headImgUrl != null)
- map['HeadImgUrl'] = headImgUrl;
- if(patientType != null)
- map['PatientType'] = patientType;
- map['IsReferral'] = isReferral;
- return map;
- }
- }
- class PatientInfoDTO extends PatientInfoBaseDTO{
- String? creatorCode;
- String? deviceCode;
- List<String >? updateUsers;
- PatientInfoDTO({
- this.creatorCode,
- this.deviceCode,
- this.updateUsers,
- String? patientCode,
- String? name,
- String? phone,
- String? identityCard,
- String? insuranceCode,
- String? age,
- int gender = 0,
- bool isValid = false,
- String? organizationCode,
- String? rootOrganizationCode,
- List<String >? assignmentUserCodes,
- List<DataItemDTO >? patientData,
- int unReadRecordCount = 0,
- String? headImgUrl,
- String? patientType,
- bool isReferral = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- patientCode: patientCode,
- name: name,
- phone: phone,
- identityCard: identityCard,
- insuranceCode: insuranceCode,
- age: age,
- gender: gender,
- isValid: isValid,
- organizationCode: organizationCode,
- rootOrganizationCode: rootOrganizationCode,
- assignmentUserCodes: assignmentUserCodes,
- patientData: patientData,
- unReadRecordCount: unReadRecordCount,
- headImgUrl: headImgUrl,
- patientType: patientType,
- isReferral: isReferral,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory PatientInfoDTO.fromJson(Map<String, dynamic> map) {
- return PatientInfoDTO(
- creatorCode: map['CreatorCode'],
- deviceCode: map['DeviceCode'],
- updateUsers: map['UpdateUsers'] != null ? map['UpdateUsers'].cast<String>().toList() : null,
- patientCode: map['PatientCode'],
- name: map['Name'],
- phone: map['Phone'],
- identityCard: map['IdentityCard'],
- insuranceCode: map['InsuranceCode'],
- age: map['Age'],
- 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'],
- headImgUrl: map['HeadImgUrl'],
- patientType: map['PatientType'],
- 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(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(updateUsers != null)
- map['UpdateUsers'] = updateUsers;
- return map;
- }
- }
- class CreatePatientsRequest extends TokenRequest{
- List<PatientInfoDTO >? patients;
- CreatePatientsRequest({
- this.patients,
- String? token,
- }) : super(
- token: token,
- );
- factory CreatePatientsRequest.fromJson(Map<String, dynamic> map) {
- return CreatePatientsRequest(
- patients: map['Patients'] != null ? (map['Patients'] as List).map((e)=>PatientInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patients != null)
- map['Patients'] = patients;
- return map;
- }
- }
- class ClientPatientInfoBaseDTO extends BaseDTO{
- String? patientCode;
- bool isValid;
- List<DataItemDTO >? patientData;
- int unReadRecordCount;
- bool isReferral;
- ClientPatientInfoBaseDTO({
- this.patientCode,
- this.isValid = false,
- this.patientData,
- this.unReadRecordCount = 0,
- this.isReferral = false,
- 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'],
- 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(patientCode != null)
- map['PatientCode'] = patientCode;
- map['IsValid'] = isValid;
- if(patientData != null)
- map['PatientData'] = patientData;
- map['UnReadRecordCount'] = unReadRecordCount;
- map['IsReferral'] = isReferral;
- return map;
- }
- }
- enum PatientValidStatusEnum {
- All,
- CheckOut,
- CheckIn,
- }
- class FindPatientsPageRequest extends PageRequest{
- String? keyWord;
- DateTime? startTime;
- DateTime? endTime;
- PatientValidStatusEnum isValid;
- FindPatientsPageRequest({
- 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 FindPatientsPageRequest.fromJson(Map<String, dynamic> map) {
- return FindPatientsPageRequest(
- 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 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;
- }
- }
- enum RecordStatusEnum {
- NotScanned,
- Uploaded,
- NotReport,
- Completed,
- }
- class TerminalImageDTO {
- String? previewUrl;
- String? imageUrl;
- String? coverImageUrl;
- TerminalImageDTO({
- this.previewUrl,
- this.imageUrl,
- this.coverImageUrl,
- });
- factory TerminalImageDTO.fromJson(Map<String, dynamic> map) {
- return TerminalImageDTO(
- previewUrl: map['PreviewUrl'],
- imageUrl: map['ImageUrl'],
- coverImageUrl: map['CoverImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(previewUrl != null)
- map['PreviewUrl'] = previewUrl;
- if(imageUrl != null)
- map['ImageUrl'] = imageUrl;
- if(coverImageUrl != null)
- map['CoverImageUrl'] = coverImageUrl;
- return map;
- }
- }
- class ImageLocationDTO {
- String? group;
- String? position;
- String? quadrant;
- ImageLocationDTO({
- this.group,
- this.position,
- this.quadrant,
- });
- factory ImageLocationDTO.fromJson(Map<String, dynamic> map) {
- return ImageLocationDTO(
- group: map['Group'],
- position: map['Position'],
- quadrant: map['Quadrant'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(group != null)
- map['Group'] = group;
- if(position != null)
- map['Position'] = position;
- if(quadrant != null)
- map['Quadrant'] = quadrant;
- return map;
- }
- }
- class ChildrenFetusNodeDTO {
- String? typeName;
- String? folderName;
- String? folderDescription;
- String? modeName;
- String? applicationId;
- String? application;
- List<String >? children;
- ChildrenFetusNodeDTO({
- this.typeName,
- this.folderName,
- this.folderDescription,
- this.modeName,
- this.applicationId,
- this.application,
- this.children,
- });
- factory ChildrenFetusNodeDTO.fromJson(Map<String, dynamic> map) {
- return ChildrenFetusNodeDTO(
- typeName: map['TypeName'],
- folderName: map['FolderName'],
- folderDescription: map['FolderDescription'],
- modeName: map['ModeName'],
- applicationId: map['ApplicationId'],
- application: map['Application'],
- children: map['Children'] != null ? map['Children'].cast<String>().toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(typeName != null)
- map['TypeName'] = typeName;
- if(folderName != null)
- map['FolderName'] = folderName;
- if(folderDescription != null)
- map['FolderDescription'] = folderDescription;
- if(modeName != null)
- map['ModeName'] = modeName;
- if(applicationId != null)
- map['ApplicationId'] = applicationId;
- if(application != null)
- map['Application'] = application;
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class FetusNodeDTO {
- String? typeName;
- String? fetusIndex;
- List<ChildrenFetusNodeDTO >? children;
- FetusNodeDTO({
- this.typeName,
- this.fetusIndex,
- this.children,
- });
- factory FetusNodeDTO.fromJson(Map<String, dynamic> map) {
- return FetusNodeDTO(
- typeName: map['TypeName'],
- fetusIndex: map['FetusIndex'],
- children: map['Children'] != null ? (map['Children'] as List).map((e)=>ChildrenFetusNodeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(typeName != null)
- map['TypeName'] = typeName;
- if(fetusIndex != null)
- map['FetusIndex'] = fetusIndex;
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class MeasuredResultsDTO {
- String? version;
- List<FetusNodeDTO >? fetusNodes;
- MeasuredResultsDTO({
- this.version,
- this.fetusNodes,
- });
- factory MeasuredResultsDTO.fromJson(Map<String, dynamic> map) {
- return MeasuredResultsDTO(
- version: map['Version'],
- fetusNodes: map['FetusNodes'] != null ? (map['FetusNodes'] as List).map((e)=>FetusNodeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(version != null)
- map['Version'] = version;
- if(fetusNodes != null)
- map['FetusNodes'] = fetusNodes;
- return map;
- }
- }
- class PointDTO {
- double x;
- double y;
- PointDTO({
- this.x = 0,
- this.y = 0,
- });
- factory PointDTO.fromJson(Map<String, dynamic> map) {
- return PointDTO(
- x: double.parse(map['x'].toString()),
- y: double.parse(map['y'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['x'] = x;
- map['y'] = y;
- return map;
- }
- }
- class AdornerDTO {
- String? adornerTypeName;
- PointDTO? topLeft;
- String? content;
- AdornerDTO({
- this.adornerTypeName,
- this.topLeft,
- this.content,
- });
- factory AdornerDTO.fromJson(Map<String, dynamic> map) {
- return AdornerDTO(
- adornerTypeName: map['AdornerTypeName'],
- topLeft: map['TopLeft'] != null ? PointDTO.fromJson(map['TopLeft']) : null,
- content: map['Content'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(adornerTypeName != null)
- map['AdornerTypeName'] = adornerTypeName;
- if(topLeft != null)
- map['TopLeft'] = topLeft;
- if(content != null)
- map['Content'] = content;
- return map;
- }
- }
- class BaseAreaDTO {
- String? visualAreaTypeName;
- List<AdornerDTO >? adorner;
- BaseAreaDTO({
- this.visualAreaTypeName,
- this.adorner,
- });
- factory BaseAreaDTO.fromJson(Map<String, dynamic> map) {
- return BaseAreaDTO(
- visualAreaTypeName: map['VisualAreaTypeName'],
- adorner: map['Adorner'] != null ? (map['Adorner'] as List).map((e)=>AdornerDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(visualAreaTypeName != null)
- map['VisualAreaTypeName'] = visualAreaTypeName;
- if(adorner != null)
- map['Adorner'] = adorner;
- return map;
- }
- }
- class VisualAreaDTO {
- List<BaseAreaDTO >? children;
- VisualAreaDTO({
- this.children,
- });
- factory VisualAreaDTO.fromJson(Map<String, dynamic> map) {
- return VisualAreaDTO(
- children: map['Children'] != null ? (map['Children'] as List).map((e)=>BaseAreaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class VisualKeyDTO {
- String? visualKeyTypeName;
- VisualAreaDTO? visualArea;
- VisualKeyDTO({
- this.visualKeyTypeName,
- this.visualArea,
- });
- factory VisualKeyDTO.fromJson(Map<String, dynamic> map) {
- return VisualKeyDTO(
- visualKeyTypeName: map['VisualKeyTypeName'],
- visualArea: map['VisualArea'] != null ? VisualAreaDTO.fromJson(map['VisualArea']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(visualKeyTypeName != null)
- map['VisualKeyTypeName'] = visualKeyTypeName;
- if(visualArea != null)
- map['VisualArea'] = visualArea;
- return map;
- }
- }
- class VisualDTO {
- List<VisualKeyDTO >? children;
- VisualDTO({
- this.children,
- });
- factory VisualDTO.fromJson(Map<String, dynamic> map) {
- return VisualDTO(
- children: map['Children'] != null ? (map['Children'] as List).map((e)=>VisualKeyDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(children != null)
- map['Children'] = children;
- return map;
- }
- }
- class ScanImageDTO {
- VisualDTO? visual;
- ScanImageDTO({
- this.visual,
- });
- factory ScanImageDTO.fromJson(Map<String, dynamic> map) {
- return ScanImageDTO(
- visual: map['Visual'] != null ? VisualDTO.fromJson(map['Visual']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(visual != null)
- map['Visual'] = visual;
- return map;
- }
- }
- class RemedicalInfoDTO extends BaseDTO{
- String? remedicalCode;
- String? deviceCode;
- String? recordCode;
- String? patientScanType;
- String? applicationCategory;
- String? application;
- TerminalImageDTO? terminalImages;
- RemedicalFileDataTypeEnum fileDataType;
- ImageLocationDTO? imageLocation;
- DiagnosisConclusionEnum diagnosisConclusion;
- String? diagnosisResult;
- List<DiagnosisOrganEnum >? diagnosisOrgans;
- MeasuredResultsDTO? measuredResult;
- ScanImageDTO? commentResult;
- CarotidResultDTO? carotidResult;
- DateTime? createTime;
- DateTime? updateTime;
- RemedicalInfoDTO({
- this.remedicalCode,
- this.deviceCode,
- this.recordCode,
- this.patientScanType,
- this.applicationCategory,
- this.application,
- this.terminalImages,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- this.imageLocation,
- this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
- this.diagnosisResult,
- this.diagnosisOrgans,
- this.measuredResult,
- this.commentResult,
- this.carotidResult,
- this.createTime,
- this.updateTime,
- });
- factory RemedicalInfoDTO.fromJson(Map<String, dynamic> map) {
- return RemedicalInfoDTO(
- remedicalCode: map['RemedicalCode'],
- deviceCode: map['DeviceCode'],
- recordCode: map['RecordCode'],
- patientScanType: map['PatientScanType'],
- applicationCategory: map['ApplicationCategory'],
- application: map['Application'],
- terminalImages: map['TerminalImages'] != null ? TerminalImageDTO.fromJson(map['TerminalImages']) : null,
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
- diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
- diagnosisResult: map['DiagnosisResult'],
- diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
- measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
- commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
- carotidResult: map['CarotidResult'] != null ? CarotidResultDTO.fromJson(map['CarotidResult']) : 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();
- return map;
- }
- }
- enum DiagnosisStatusEnum {
- NotRequired,
- Under,
- Completed,
- }
- enum DiagnosisReportStatusEnum {
- NotRequired,
- Reporting,
- Reported,
- }
- class DiagnosisInfoDTO {
- DiagnosisOrganEnum diagnosisOrgan;
- DiagnosisConclusionEnum conclusion;
- DiagnosisReportStatusEnum reportStatus;
- DiagnosisInfoDTO({
- this.diagnosisOrgan = DiagnosisOrganEnum.Null,
- this.conclusion = DiagnosisConclusionEnum.NotRequired,
- this.reportStatus = DiagnosisReportStatusEnum.NotRequired,
- });
- factory DiagnosisInfoDTO.fromJson(Map<String, dynamic> map) {
- return DiagnosisInfoDTO(
- diagnosisOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['DiagnosisOrgan']),
- conclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['Conclusion']),
- reportStatus: DiagnosisReportStatusEnum.values.firstWhere((e) => e.index == map['ReportStatus']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['DiagnosisOrgan'] = diagnosisOrgan.index;
- map['Conclusion'] = conclusion.index;
- map['ReportStatus'] = reportStatus.index;
- return map;
- }
- }
- enum ReferralStatusEnum {
- Wait,
- Withdrawn,
- TimedOut,
- Accepted,
- Rejected,
- }
- class GetRecordsPageDTO {
- DateTime? createTime;
- String? deptName;
- String? creatorName;
- String? deviceName;
- String? reportNum;
- String? recordCode;
- RecordStatusEnum recordStatus;
- bool isRead;
- List<RemedicalInfoDTO >? remedicalList;
- DiagnosisStatusEnum diagnosisStatus;
- List<DiagnosisInfoDTO >? diagnosisInfos;
- bool isReferral;
- ReferralStatusEnum referralStatus;
- bool canCreateReport;
- GetRecordsPageDTO({
- this.createTime,
- this.deptName,
- this.creatorName,
- this.deviceName,
- this.reportNum,
- this.recordCode,
- this.recordStatus = RecordStatusEnum.NotScanned,
- this.isRead = false,
- this.remedicalList,
- this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
- this.diagnosisInfos,
- this.isReferral = false,
- this.referralStatus = ReferralStatusEnum.Wait,
- this.canCreateReport = false,
- });
- factory GetRecordsPageDTO.fromJson(Map<String, dynamic> map) {
- return GetRecordsPageDTO(
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- deptName: map['DeptName'],
- creatorName: map['CreatorName'],
- deviceName: map['DeviceName'],
- reportNum: map['ReportNum'],
- recordCode: map['RecordCode'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- isRead: map['IsRead'],
- remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
- diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isReferral: map['IsReferral'],
- referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
- canCreateReport: map['CanCreateReport'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if(deptName != null)
- map['DeptName'] = deptName;
- if(creatorName != null)
- map['CreatorName'] = creatorName;
- if(deviceName != null)
- map['DeviceName'] = deviceName;
- if(reportNum != null)
- map['ReportNum'] = reportNum;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- map['RecordStatus'] = recordStatus.index;
- map['IsRead'] = isRead;
- if(remedicalList != null)
- map['RemedicalList'] = remedicalList;
- map['DiagnosisStatus'] = diagnosisStatus.index;
- if(diagnosisInfos != null)
- map['DiagnosisInfos'] = diagnosisInfos;
- map['IsReferral'] = isReferral;
- map['ReferralStatus'] = referralStatus.index;
- map['CanCreateReport'] = canCreateReport;
- return map;
- }
- }
- class ClientPatientInfoDTO extends ClientPatientInfoBaseDTO{
- String? creatorCode;
- String? creatorName;
- String? deviceCode;
- List<UserBaseDTO >? assignmentUserList;
- GetRecordsPageDTO? lastRecord;
- String? encryptFullName;
- ClientPatientInfoDTO({
- this.creatorCode,
- this.creatorName,
- this.deviceCode,
- this.assignmentUserList,
- this.lastRecord,
- this.encryptFullName,
- 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 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,
- lastRecord: map['LastRecord'] != null ? GetRecordsPageDTO.fromJson(map['LastRecord']) : null,
- encryptFullName: map['EncryptFullName'],
- 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(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(creatorName != null)
- map['CreatorName'] = creatorName;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(assignmentUserList != null)
- map['AssignmentUserList'] = assignmentUserList;
- if(lastRecord != null)
- map['LastRecord'] = lastRecord;
- if(encryptFullName != null)
- map['EncryptFullName'] = encryptFullName;
- return map;
- }
- }
- class FindPatientByCodeRequest extends TokenRequest{
- String? code;
- FindPatientByCodeRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory FindPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
- return FindPatientByCodeRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- return map;
- }
- }
- class FindValidPatientsByNameRequest extends TokenRequest{
- String? name;
- FindValidPatientsByNameRequest({
- this.name,
- String? token,
- }) : super(
- token: token,
- );
- factory FindValidPatientsByNameRequest.fromJson(Map<String, dynamic> map) {
- return FindValidPatientsByNameRequest(
- name: map['Name'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(name != null)
- map['Name'] = name;
- return map;
- }
- }
- class SetValidPatientRequest extends TokenRequest{
- String? newPatientCode;
- String? oldPatientCode;
- bool isFinishExam;
- SetValidPatientRequest({
- this.newPatientCode,
- this.oldPatientCode,
- this.isFinishExam = false,
- String? token,
- }) : super(
- token: token,
- );
- factory SetValidPatientRequest.fromJson(Map<String, dynamic> map) {
- return SetValidPatientRequest(
- newPatientCode: map['NewPatientCode'],
- oldPatientCode: map['OldPatientCode'],
- isFinishExam: map['IsFinishExam'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(newPatientCode != null)
- map['NewPatientCode'] = newPatientCode;
- if(oldPatientCode != null)
- map['OldPatientCode'] = oldPatientCode;
- map['IsFinishExam'] = isFinishExam;
- return map;
- }
- }
- class RemovePatientsRequest extends TokenRequest{
- List<String >? patientCodes;
- RemovePatientsRequest({
- this.patientCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory RemovePatientsRequest.fromJson(Map<String, dynamic> map) {
- return RemovePatientsRequest(
- patientCodes: map['PatientCodes'] != null ? map['PatientCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCodes != null)
- map['PatientCodes'] = patientCodes;
- return map;
- }
- }
|