123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954 |
- import 'liveConsultation.m.dart';
- import 'patient.m.dart';
- import 'notification.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- class PatientInfoExt {
- String? patientScanType;
- List<DataItemDTO >? content;
- PatientInfoExt({
- this.patientScanType,
- this.content,
- });
- factory PatientInfoExt.fromJson(Map<String, dynamic> map) {
- return PatientInfoExt(
- patientScanType: map['PatientScanType'],
- content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(patientScanType != null)
- map['PatientScanType'] = patientScanType;
- if(content != null)
- map['Content'] = content;
- return map;
- }
- }
- class CreateRecordRequest extends TokenRequest{
- String? patientCode;
- String? deviceCode;
- List<PatientInfoExt >? patientInfoExtList;
- CreateRecordRequest({
- this.patientCode,
- this.deviceCode,
- this.patientInfoExtList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateRecordRequest.fromJson(Map<String, dynamic> map) {
- return CreateRecordRequest(
- patientCode: map['PatientCode'],
- deviceCode: map['DeviceCode'],
- patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- return map;
- }
- }
- enum QueryRecordStatusEnum {
- All,
- NotScanned,
- Uploaded,
- NotReport,
- Completed,
- NotCompleted,
- }
- enum QueryRecordCreateTypeEnum {
- All,
- Reservation,
- Normal,
- }
- class GetRecordsPageRequest extends PageRequest{
- String? patientCode;
- QueryRecordStatusEnum queryRecordStatus;
- QueryRecordCreateTypeEnum queryRecordCreateType;
- GetRecordsPageRequest({
- this.patientCode,
- this.queryRecordStatus = QueryRecordStatusEnum.All,
- this.queryRecordCreateType = QueryRecordCreateTypeEnum.All,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory GetRecordsPageRequest.fromJson(Map<String, dynamic> map) {
- return GetRecordsPageRequest(
- patientCode: map['PatientCode'],
- queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
- queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- map['QueryRecordStatus'] = queryRecordStatus.index;
- map['QueryRecordCreateType'] = queryRecordCreateType.index;
- return map;
- }
- }
- class QueryRecordResult {
- DateTime? createTime;
- String? deptName;
- String? patientName;
- String? patientAge;
- List<DataItemDTO >? patientAgeInfo;
- int patientSex;
- String? creatorName;
- String? deviceName;
- String? displayName;
- RecordStatusEnum recordStatus;
- List<PatientInfoExt >? patientInfoExtList;
- DiagnosisStatusEnum diagnosisStatus;
- List<DiagnosisInfoDTO >? diagnosisInfos;
- bool isCollecting;
- DateTime? startCollectingTime;
- QueryRecordResult({
- this.createTime,
- this.deptName,
- this.patientName,
- this.patientAge,
- this.patientAgeInfo,
- this.patientSex = 0,
- this.creatorName,
- this.deviceName,
- this.displayName,
- this.recordStatus = RecordStatusEnum.NotScanned,
- this.patientInfoExtList,
- this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
- this.diagnosisInfos,
- this.isCollecting = false,
- this.startCollectingTime,
- });
- factory QueryRecordResult.fromJson(Map<String, dynamic> map) {
- return QueryRecordResult(
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- deptName: map['DeptName'],
- patientName: map['PatientName'],
- patientAge: map['PatientAge'],
- patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- patientSex: map['PatientSex'],
- creatorName: map['CreatorName'],
- deviceName: map['DeviceName'],
- displayName: map['DisplayName'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.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,
- isCollecting: map['IsCollecting'],
- startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if(deptName != null)
- map['DeptName'] = deptName;
- if(patientName != null)
- map['PatientName'] = patientName;
- if(patientAge != null)
- map['PatientAge'] = patientAge;
- if(patientAgeInfo != null)
- map['PatientAgeInfo'] = patientAgeInfo;
- map['PatientSex'] = patientSex;
- if(creatorName != null)
- map['CreatorName'] = creatorName;
- if(deviceName != null)
- map['DeviceName'] = deviceName;
- if(displayName != null)
- map['DisplayName'] = displayName;
- map['RecordStatus'] = recordStatus.index;
- if(patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- map['DiagnosisStatus'] = diagnosisStatus.index;
- if(diagnosisInfos != null)
- map['DiagnosisInfos'] = diagnosisInfos;
- map['IsCollecting'] = isCollecting;
- if(startCollectingTime != null)
- map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!);
- return map;
- }
- }
- class QueryRecordRequest extends TokenRequest{
- String? recordCode;
- QueryRecordRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory QueryRecordRequest.fromJson(Map<String, dynamic> map) {
- return QueryRecordRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class ProcessRecordDataResult {
- List<DataItemDTO >? content;
- ProcessRecordDataResult({
- this.content,
- });
- factory ProcessRecordDataResult.fromJson(Map<String, dynamic> map) {
- return ProcessRecordDataResult(
- content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(content != null)
- map['Content'] = content;
- return map;
- }
- }
- enum AnimalSpeciesEnum {
- Bovine,
- Canidae,
- Equidae,
- Felidae,
- Caprinae,
- Suidae,
- }
- class ProcessRecordDataRequest extends TokenRequest{
- String? methodName;
- List<DataItemDTO >? content;
- OrganizationPatientTypeEnum patientType;
- AnimalSpeciesEnum speciesEnum;
- ProcessRecordDataRequest({
- this.methodName,
- this.content,
- this.patientType = OrganizationPatientTypeEnum.Person,
- this.speciesEnum = AnimalSpeciesEnum.Bovine,
- String? token,
- }) : super(
- token: token,
- );
- factory ProcessRecordDataRequest.fromJson(Map<String, dynamic> map) {
- return ProcessRecordDataRequest(
- methodName: map['MethodName'],
- content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
- speciesEnum: AnimalSpeciesEnum.values.firstWhere((e) => e.index == map['SpeciesEnum']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(methodName != null)
- map['MethodName'] = methodName;
- if(content != null)
- map['Content'] = content;
- map['PatientType'] = patientType.index;
- map['SpeciesEnum'] = speciesEnum.index;
- return map;
- }
- }
- class RelevanceRecordRequest extends TokenRequest{
- String? examCode;
- String? rservationCode;
- RelevanceRecordRequest({
- this.examCode,
- this.rservationCode,
- String? token,
- }) : super(
- token: token,
- );
- factory RelevanceRecordRequest.fromJson(Map<String, dynamic> map) {
- return RelevanceRecordRequest(
- examCode: map['ExamCode'],
- rservationCode: map['RservationCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(examCode != null)
- map['ExamCode'] = examCode;
- if(rservationCode != null)
- map['RservationCode'] = rservationCode;
- return map;
- }
- }
- class FinishRecordRequest extends TokenRequest{
- String? recordCode;
- FinishRecordRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FinishRecordRequest.fromJson(Map<String, dynamic> map) {
- return FinishRecordRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class AddRemedicalMeasuredInfoDTO {
- String? remedicalCode;
- int frameIndex;
- String? measuredFileToken;
- String? previewFileToken;
- String? measuredData;
- AddRemedicalMeasuredInfoDTO({
- this.remedicalCode,
- this.frameIndex = 0,
- this.measuredFileToken,
- this.previewFileToken,
- this.measuredData,
- });
- factory AddRemedicalMeasuredInfoDTO.fromJson(Map<String, dynamic> map) {
- return AddRemedicalMeasuredInfoDTO(
- remedicalCode: map['RemedicalCode'],
- frameIndex: map['FrameIndex'],
- measuredFileToken: map['MeasuredFileToken'],
- previewFileToken: map['PreviewFileToken'],
- measuredData: map['MeasuredData'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(remedicalCode != null)
- map['RemedicalCode'] = remedicalCode;
- map['FrameIndex'] = frameIndex;
- if(measuredFileToken != null)
- map['MeasuredFileToken'] = measuredFileToken;
- if(previewFileToken != null)
- map['PreviewFileToken'] = previewFileToken;
- if(measuredData != null)
- map['MeasuredData'] = measuredData;
- return map;
- }
- }
- class AddRemedicalMeasuredInfoRequest extends TokenRequest{
- BusinessTypeEnum businessType;
- String? recordCode;
- List<AddRemedicalMeasuredInfoDTO >? remedicalMeasuredInfos;
- AddRemedicalMeasuredInfoRequest({
- this.businessType = BusinessTypeEnum.RemoteDiagnosis,
- this.recordCode,
- this.remedicalMeasuredInfos,
- String? token,
- }) : super(
- token: token,
- );
- factory AddRemedicalMeasuredInfoRequest.fromJson(Map<String, dynamic> map) {
- return AddRemedicalMeasuredInfoRequest(
- businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
- recordCode: map['RecordCode'],
- remedicalMeasuredInfos: map['RemedicalMeasuredInfos'] != null ? (map['RemedicalMeasuredInfos'] as List).map((e)=>AddRemedicalMeasuredInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['BusinessType'] = businessType.index;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(remedicalMeasuredInfos != null)
- map['RemedicalMeasuredInfos'] = remedicalMeasuredInfos;
- return map;
- }
- }
- class FindRemedicalMeasuredInfoRequest extends TokenRequest{
- BusinessTypeEnum businessType;
- String? recordCode;
- FindRemedicalMeasuredInfoRequest({
- this.businessType = BusinessTypeEnum.RemoteDiagnosis,
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindRemedicalMeasuredInfoRequest.fromJson(Map<String, dynamic> map) {
- return FindRemedicalMeasuredInfoRequest(
- businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['BusinessType'] = businessType.index;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- class CheckCollectingImgRequest extends TokenRequest{
- String? deviceCode;
- CheckCollectingImgRequest({
- this.deviceCode,
- String? token,
- }) : super(
- token: token,
- );
- factory CheckCollectingImgRequest.fromJson(Map<String, dynamic> map) {
- return CheckCollectingImgRequest(
- deviceCode: map['DeviceCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class StartCollectingImgRequest extends TokenRequest{
- String? recordCode;
- StartCollectingImgRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory StartCollectingImgRequest.fromJson(Map<String, dynamic> map) {
- return StartCollectingImgRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- enum ReferralTypeEnum {
- Normal,
- ReferralIn,
- ReferralOut,
- }
- class SimpleRecordInfoDTO extends BaseDTO{
- String? recordCode;
- RecordStatusEnum recordStatus;
- ReferralTypeEnum referralType;
- String? patientCode;
- String? patientName;
- String? age;
- String? sex;
- String? devicePatientID;
- String? deviceCode;
- String? deviceName;
- String? rootOrganizationCode;
- String? rootOrganizationName;
- String? languge;
- SimpleRecordInfoDTO({
- this.recordCode,
- this.recordStatus = RecordStatusEnum.NotScanned,
- this.referralType = ReferralTypeEnum.Normal,
- this.patientCode,
- this.patientName,
- this.age,
- this.sex,
- this.devicePatientID,
- this.deviceCode,
- this.deviceName,
- this.rootOrganizationCode,
- this.rootOrganizationName,
- this.languge,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory SimpleRecordInfoDTO.fromJson(Map<String, dynamic> map) {
- return SimpleRecordInfoDTO(
- recordCode: map['RecordCode'],
- recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
- referralType: ReferralTypeEnum.values.firstWhere((e) => e.index == map['ReferralType']),
- patientCode: map['PatientCode'],
- patientName: map['PatientName'],
- age: map['Age'],
- sex: map['Sex'],
- devicePatientID: map['DevicePatientID'],
- deviceCode: map['DeviceCode'],
- deviceName: map['DeviceName'],
- rootOrganizationCode: map['RootOrganizationCode'],
- rootOrganizationName: map['RootOrganizationName'],
- languge: map['Languge'],
- 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(recordCode != null)
- map['RecordCode'] = recordCode;
- map['RecordStatus'] = recordStatus.index;
- map['ReferralType'] = referralType.index;
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(patientName != null)
- map['PatientName'] = patientName;
- if(age != null)
- map['Age'] = age;
- if(sex != null)
- map['Sex'] = sex;
- if(devicePatientID != null)
- map['DevicePatientID'] = devicePatientID;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(deviceName != null)
- map['DeviceName'] = deviceName;
- if(rootOrganizationCode != null)
- map['RootOrganizationCode'] = rootOrganizationCode;
- if(rootOrganizationName != null)
- map['RootOrganizationName'] = rootOrganizationName;
- if(languge != null)
- map['Languge'] = languge;
- return map;
- }
- }
- enum RecordQueryStateEnum {
- All,
- NotScanned,
- Uploaded,
- NotReport,
- Completed,
- }
- enum RecordProcessStateEnum {
- All,
- Wait,
- Done,
- ReferralOut,
- }
- class FindRecordPagesRequest extends PageRequest{
- List<String >? organizationCodes;
- List<String >? deviceCodes;
- RecordQueryStateEnum recordQueryState;
- RecordProcessStateEnum recordProcessState;
- String? language;
- String? keyWord;
- DateTime? startTime;
- DateTime? endTime;
- FindRecordPagesRequest({
- this.organizationCodes,
- this.deviceCodes,
- this.recordQueryState = RecordQueryStateEnum.All,
- this.recordProcessState = RecordProcessStateEnum.All,
- this.language,
- this.keyWord,
- this.startTime,
- this.endTime,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindRecordPagesRequest.fromJson(Map<String, dynamic> map) {
- return FindRecordPagesRequest(
- organizationCodes: map['OrganizationCodes'] != null ? map['OrganizationCodes'].cast<String>().toList() : null,
- deviceCodes: map['DeviceCodes'] != null ? map['DeviceCodes'].cast<String>().toList() : null,
- recordQueryState: RecordQueryStateEnum.values.firstWhere((e) => e.index == map['RecordQueryState']),
- recordProcessState: RecordProcessStateEnum.values.firstWhere((e) => e.index == map['RecordProcessState']),
- language: map['Language'],
- keyWord: map['KeyWord'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(organizationCodes != null)
- map['OrganizationCodes'] = organizationCodes;
- if(deviceCodes != null)
- map['DeviceCodes'] = deviceCodes;
- map['RecordQueryState'] = recordQueryState.index;
- map['RecordProcessState'] = recordProcessState.index;
- if(language != null)
- map['Language'] = language;
- if(keyWord != null)
- map['KeyWord'] = keyWord;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if(endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- return map;
- }
- }
- class CreateRecordNewRequest extends TokenRequest{
- String? patientCode;
- List<DataItemDTO >? patientDatas;
- String? deviceCode;
- List<PatientInfoExt >? patientInfoExtList;
- CreateRecordNewRequest({
- this.patientCode,
- this.patientDatas,
- this.deviceCode,
- this.patientInfoExtList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateRecordNewRequest.fromJson(Map<String, dynamic> map) {
- return CreateRecordNewRequest(
- patientCode: map['PatientCode'],
- patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- deviceCode: map['DeviceCode'],
- patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(patientCode != null)
- map['PatientCode'] = patientCode;
- if(patientDatas != null)
- map['PatientDatas'] = patientDatas;
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(patientInfoExtList != null)
- map['PatientInfoExtList'] = patientInfoExtList;
- return map;
- }
- }
- class CreateReferralRecordNewRequest extends TokenRequest{
- String? recordCode;
- String? referralOrganizationCode;
- String? referralUserCode;
- String? subjectMatter;
- CreateReferralRecordNewRequest({
- this.recordCode,
- this.referralOrganizationCode,
- this.referralUserCode,
- this.subjectMatter,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateReferralRecordNewRequest.fromJson(Map<String, dynamic> map) {
- return CreateReferralRecordNewRequest(
- recordCode: map['RecordCode'],
- referralOrganizationCode: map['ReferralOrganizationCode'],
- referralUserCode: map['ReferralUserCode'],
- subjectMatter: map['SubjectMatter'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(referralOrganizationCode != null)
- map['ReferralOrganizationCode'] = referralOrganizationCode;
- if(referralUserCode != null)
- map['ReferralUserCode'] = referralUserCode;
- if(subjectMatter != null)
- map['SubjectMatter'] = subjectMatter;
- return map;
- }
- }
- class WithdrawReferralForRecordListRequest extends TokenRequest{
- String? recordCode;
- WithdrawReferralForRecordListRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory WithdrawReferralForRecordListRequest.fromJson(Map<String, dynamic> map) {
- return WithdrawReferralForRecordListRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
- enum RecordReferralStatusEnum {
- ReferralIn,
- Processed,
- Withdrawn,
- }
- class ReferralData extends BaseDTO{
- String? code;
- String? recordCode;
- String? referralOutUserCode;
- String? referralOutOrganizationCode;
- String? referralInUserCode;
- String? referralInOrganizationCode;
- RecordReferralStatusEnum referralStatus;
- DateTime? referralTime;
- String? subjectMatter;
- ReferralData({
- this.code,
- this.recordCode,
- this.referralOutUserCode,
- this.referralOutOrganizationCode,
- this.referralInUserCode,
- this.referralInOrganizationCode,
- this.referralStatus = RecordReferralStatusEnum.ReferralIn,
- this.referralTime,
- this.subjectMatter,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ReferralData.fromJson(Map<String, dynamic> map) {
- return ReferralData(
- code: map['Code'],
- recordCode: map['RecordCode'],
- referralOutUserCode: map['ReferralOutUserCode'],
- referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
- referralInUserCode: map['ReferralInUserCode'],
- referralInOrganizationCode: map['ReferralInOrganizationCode'],
- referralStatus: RecordReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
- referralTime: map['ReferralTime'] != null ? DateTime.parse(map['ReferralTime']) : null,
- subjectMatter: map['SubjectMatter'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- if(referralOutUserCode != null)
- map['ReferralOutUserCode'] = referralOutUserCode;
- if(referralOutOrganizationCode != null)
- map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
- if(referralInUserCode != null)
- map['ReferralInUserCode'] = referralInUserCode;
- if(referralInOrganizationCode != null)
- map['ReferralInOrganizationCode'] = referralInOrganizationCode;
- map['ReferralStatus'] = referralStatus.index;
- if(referralTime != null)
- map['ReferralTime'] = JsonRpcUtils.dateFormat(referralTime!);
- if(subjectMatter != null)
- map['SubjectMatter'] = subjectMatter;
- return map;
- }
- }
- class ReferralHistoryDetail extends ReferralData{
- String? referralOutOrganizationName;
- String? referralOutUserName;
- String? referralInOrganizationName;
- String? referralInUserName;
- ReferralHistoryDetail({
- this.referralOutOrganizationName,
- this.referralOutUserName,
- this.referralInOrganizationName,
- this.referralInUserName,
- String? code,
- String? recordCode,
- String? referralOutUserCode,
- String? referralOutOrganizationCode,
- String? referralInUserCode,
- String? referralInOrganizationCode,
- RecordReferralStatusEnum referralStatus = RecordReferralStatusEnum.ReferralIn,
- DateTime? referralTime,
- String? subjectMatter,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- code: code,
- recordCode: recordCode,
- referralOutUserCode: referralOutUserCode,
- referralOutOrganizationCode: referralOutOrganizationCode,
- referralInUserCode: referralInUserCode,
- referralInOrganizationCode: referralInOrganizationCode,
- referralStatus: referralStatus,
- referralTime: referralTime,
- subjectMatter: subjectMatter,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ReferralHistoryDetail.fromJson(Map<String, dynamic> map) {
- return ReferralHistoryDetail(
- referralOutOrganizationName: map['ReferralOutOrganizationName'],
- referralOutUserName: map['ReferralOutUserName'],
- referralInOrganizationName: map['ReferralInOrganizationName'],
- referralInUserName: map['ReferralInUserName'],
- code: map['Code'],
- recordCode: map['RecordCode'],
- referralOutUserCode: map['ReferralOutUserCode'],
- referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
- referralInUserCode: map['ReferralInUserCode'],
- referralInOrganizationCode: map['ReferralInOrganizationCode'],
- referralStatus: RecordReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
- referralTime: map['ReferralTime'] != null ? DateTime.parse(map['ReferralTime']) : null,
- subjectMatter: map['SubjectMatter'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(referralOutOrganizationName != null)
- map['ReferralOutOrganizationName'] = referralOutOrganizationName;
- if(referralOutUserName != null)
- map['ReferralOutUserName'] = referralOutUserName;
- if(referralInOrganizationName != null)
- map['ReferralInOrganizationName'] = referralInOrganizationName;
- if(referralInUserName != null)
- map['ReferralInUserName'] = referralInUserName;
- return map;
- }
- }
- class FindReferralHistoryRequest extends TokenRequest{
- String? recordCode;
- FindReferralHistoryRequest({
- this.recordCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindReferralHistoryRequest.fromJson(Map<String, dynamic> map) {
- return FindReferralHistoryRequest(
- recordCode: map['RecordCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(recordCode != null)
- map['RecordCode'] = recordCode;
- return map;
- }
- }
|