web-core-tcm 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/package.json +38 -21
  2. package/quasar.config.ts +28 -15
  3. package/src/api/algorithm/comprehensiveAlgorithm.ts +1 -1
  4. package/src/api/algorithm/index.ts +7 -7
  5. package/src/api/algorithm/inquiriesAlgorithm.ts +4 -7
  6. package/src/api/algorithm/inspectionsAlgorithm.ts +1 -1
  7. package/src/api/algorithm/lisemsAlgorithm.ts +3 -3
  8. package/src/api/algorithm/pulsationsAlgorithm.ts +2 -3
  9. package/src/api/authorization/alova/apiDefinitions.ts +2 -2
  10. package/src/api/authorization/alova/createApis.ts +22 -7
  11. package/src/api/authorization/alova/globals.d.ts +35 -14
  12. package/src/api/authorization/alova/implement/authorization.ts +11 -9
  13. package/src/api/authorization/alova/implement/index.ts +1 -1
  14. package/src/api/authorization/alova/index.ts +4 -5
  15. package/src/api/authorization/authorization.ts +6 -6
  16. package/src/api/authorization/index.ts +1 -1
  17. package/src/api/check/alova/apiDefinitions.ts +2 -2
  18. package/src/api/check/alova/createApis.ts +22 -7
  19. package/src/api/check/alova/globals.d.ts +29 -20
  20. package/src/api/check/alova/implement/check.ts +145 -99
  21. package/src/api/check/alova/implement/index.ts +1 -1
  22. package/src/api/check/alova/index.ts +4 -5
  23. package/src/api/check/check.ts +116 -63
  24. package/src/api/check/index.ts +1 -1
  25. package/src/api/config/alova/index.ts +26 -27
  26. package/src/api/config/index.ts +59 -57
  27. package/src/api/doctor/alova/apiDefinitions.ts +2 -2
  28. package/src/api/doctor/alova/createApis.ts +22 -7
  29. package/src/api/doctor/alova/globals.d.ts +27 -18
  30. package/src/api/doctor/alova/implement/doctor.ts +38 -24
  31. package/src/api/doctor/alova/implement/index.ts +1 -1
  32. package/src/api/doctor/alova/index.ts +4 -4
  33. package/src/api/doctor/doctor.ts +18 -18
  34. package/src/api/doctor/index.ts +1 -1
  35. package/src/api/index.ts +12 -15
  36. package/src/api/metric/implement/index.ts +1 -1
  37. package/src/api/metric/implement/metric.ts +44 -34
  38. package/src/api/metric/index.ts +1 -1
  39. package/src/api/metric/metric.ts +36 -36
  40. package/src/api/oauth/alova/apiDefinitions.ts +2 -2
  41. package/src/api/oauth/alova/createApis.ts +22 -7
  42. package/src/api/oauth/alova/globals.d.ts +25 -16
  43. package/src/api/oauth/alova/implement/index.ts +1 -1
  44. package/src/api/oauth/alova/implement/oauth.ts +20 -15
  45. package/src/api/oauth/alova/index.ts +4 -5
  46. package/src/api/oauth/index.ts +1 -1
  47. package/src/api/oauth/oauth.ts +9 -5
  48. package/src/api/outpatient/alova/apiDefinitions.ts +2 -2
  49. package/src/api/outpatient/alova/createApis.ts +22 -7
  50. package/src/api/outpatient/alova/globals.d.ts +25 -16
  51. package/src/api/outpatient/alova/implement/index.ts +1 -1
  52. package/src/api/outpatient/alova/implement/outpatient.ts +76 -51
  53. package/src/api/outpatient/alova/index.ts +4 -5
  54. package/src/api/outpatient/index.ts +1 -1
  55. package/src/api/outpatient/outpatient.ts +29 -24
  56. package/src/api/patient/alova/apiDefinitions.ts +2 -2
  57. package/src/api/patient/alova/createApis.ts +22 -7
  58. package/src/api/patient/alova/globals.d.ts +56 -43
  59. package/src/api/patient/alova/implement/index.ts +1 -1
  60. package/src/api/patient/alova/implement/meta.ts +253 -224
  61. package/src/api/patient/alova/implement/patient.ts +79 -57
  62. package/src/api/patient/alova/index.ts +3 -5
  63. package/src/api/patient/core.ts +51 -49
  64. package/src/api/patient/index.ts +1 -1
  65. package/src/api/patient/meta.ts +244 -140
  66. package/src/api/patient/patient.ts +25 -25
  67. package/src/api/prescription/alova/apiDefinitions.ts +2 -2
  68. package/src/api/prescription/alova/createApis.ts +22 -7
  69. package/src/api/prescription/alova/globals.d.ts +32 -23
  70. package/src/api/prescription/alova/implement/herbal.ts +59 -39
  71. package/src/api/prescription/alova/implement/index.ts +1 -1
  72. package/src/api/prescription/alova/implement/prescription.ts +50 -33
  73. package/src/api/prescription/alova/index.ts +4 -5
  74. package/src/api/prescription/herbal.ts +17 -10
  75. package/src/api/prescription/index.ts +1 -1
  76. package/src/api/prescription/prescription.ts +35 -27
  77. package/src/api/scientist/alova/apiDefinitions.ts +2 -2
  78. package/src/api/scientist/alova/createApis.ts +22 -7
  79. package/src/api/scientist/alova/globals.d.ts +25 -16
  80. package/src/api/scientist/alova/implement/index.ts +1 -1
  81. package/src/api/scientist/alova/implement/scientist.ts +31 -20
  82. package/src/api/scientist/alova/index.ts +5 -4
  83. package/src/api/scientist/index.ts +1 -1
  84. package/src/api/scientist/scientist.ts +20 -20
  85. package/src/index.ts +3 -4
  86. package/src/layouts/UserLayout.vue +9 -7
  87. package/src/pages/LoginPage.vue +2 -5
  88. package/src/proto/types/Images_pb.ts +13 -13
  89. package/src/proto/types/WaveMap_pb.ts +13 -13
  90. package/src/router/routes.ts +2 -2
  91. package/src/util/export.ts +4 -4
  92. package/src/util/helper.ts +6 -6
  93. package/src/util/image.ts +1 -1
  94. package/src/util/number.ts +4 -4
  95. package/src/util/s256.js +1 -4
  96. package/src/util/secret.ts +1 -1
  97. package/src/util/string.ts +18 -18
  98. package/tsconfig.json +5 -1
@@ -1,77 +1,99 @@
1
- import { Patient } from '@core/api/patient/patient';
2
- import type { Page } from '@core/api/patient/core';
1
+ import { Patient } from 'src/api/patient/patient';
2
+ import type { Page } from 'src/api/patient/core';
3
3
 
4
- export class AlovaPatient extends Patient{
4
+ export class AlovaPatient extends Patient {
5
5
  override async get() {
6
- return this.of(await patientApi.patientStateRestful.getPatientState({
7
- pathParams: {
8
- id: this.id,
9
- },
10
- priority: 'high',
11
- async transform(json) {
12
- return new AlovaPatient().of(json);
13
- }
14
- }).send())
6
+ return this.of(
7
+ await patientApi.patientStateRestful
8
+ .getPatientState({
9
+ pathParams: {
10
+ id: this.id,
11
+ },
12
+ priority: 'high',
13
+ async transform(json) {
14
+ return new AlovaPatient().of(json);
15
+ },
16
+ })
17
+ .send(),
18
+ );
15
19
  }
16
20
 
17
21
  override async put() {
18
- return this.of(await patientApi.patientStateRestful.putPatientState({
19
- pathParams: {
20
- id: this.id,
21
- },
22
- data: this.state()
23
- }).send(true));
22
+ return this.of(
23
+ await patientApi.patientStateRestful
24
+ .putPatientState({
25
+ pathParams: {
26
+ id: this.id,
27
+ },
28
+ data: this.state(),
29
+ })
30
+ .send(true),
31
+ );
24
32
  }
25
33
 
26
34
  override async post() {
27
- return this.of(await patientApi.patientStateRestful.postPatientState({
28
- data: this.state()
29
- }).send(true))
35
+ return this.of(
36
+ await patientApi.patientStateRestful
37
+ .postPatientState({
38
+ data: this.state(),
39
+ })
40
+ .send(true),
41
+ );
30
42
  }
31
43
  override delete() {
32
- void patientApi.patientStateRestful.deletePatientState({
33
- pathParams: {
34
- id: this.id,
35
- }
36
- }).send();
44
+ void patientApi.patientStateRestful
45
+ .deletePatientState({
46
+ pathParams: {
47
+ id: this.id,
48
+ },
49
+ })
50
+ .send();
37
51
  return Promise.resolve(this);
38
52
  }
39
- override async putRemarks(){
40
- return this.of(await patientApi.patientStateRestful.putPatientState({
41
- pathParams: {
42
- id: this.id,
43
- },
44
- data: {
45
- remarks: this.remarks,
46
- }
47
- }).send(true));
53
+ override async putRemarks() {
54
+ return this.of(
55
+ await patientApi.patientStateRestful
56
+ .putPatientState({
57
+ pathParams: {
58
+ id: this.id,
59
+ },
60
+ data: {
61
+ remarks: this.remarks,
62
+ },
63
+ })
64
+ .send(true),
65
+ );
48
66
  }
49
67
  static override query(params: {
50
- id?: string;
51
- doctorId?: string;
52
- name?: string;
53
- gender?: string;
54
- identity?: string;
55
- pageSize: number;
56
- page: number;
57
- phoneNumber?: string;
58
- startTime?: string;
59
- endTime?: string;
60
- sort?: string;
61
- }): Promise<Page<Patient>> {
62
- return patientApi.patientStateRestful.queryPatientState({
68
+ id?: string;
69
+ doctorId?: string;
70
+ name?: string;
71
+ gender?: string;
72
+ identity?: string;
73
+ pageSize: number;
74
+ page: number;
75
+ phoneNumber?: string;
76
+ startTime?: string;
77
+ endTime?: string;
78
+ sort?: string;
79
+ }): Promise<Page<Patient>> {
80
+ return patientApi.patientStateRestful
81
+ .queryPatientState({
63
82
  params: params,
64
83
  async transform(json): Promise<Page<Patient>> {
65
- const patient = await Promise.all(json.content!.map(item => new AlovaPatient().of(item)));
84
+ const patient = await Promise.all(
85
+ json.content.map((item) => new AlovaPatient().of(item)),
86
+ );
66
87
  return {
67
88
  data: patient,
68
- total: json.totalElements!,
69
- page: json.number!,
70
- pageCount: json.totalPages!,
71
- pageSize: json.size!,
72
- isLastPage: json.last!,
73
- }
74
- }
75
- }).send();
89
+ total: json.totalElements,
90
+ page: json.number,
91
+ pageCount: json.totalPages,
92
+ pageSize: json.size,
93
+ isLastPage: json.last,
94
+ };
95
+ },
96
+ })
97
+ .send();
76
98
  }
77
99
  }
@@ -1,8 +1,8 @@
1
1
  import { createAlova } from 'alova';
2
2
  import fetchAdapter from 'alova/fetch';
3
3
  import { createApis, mountApis, withConfigType } from './createApis';
4
- import { onAuthRequired, responded } from '@core/api/config/alova';
5
- import { getServiceEndpoint, ServiceType } from '@core/api/config';
4
+ import { onAuthRequired, responded } from 'src/api/config/alova';
5
+ import { getServiceEndpoint, ServiceType } from 'src/api/config';
6
6
 
7
7
  export const alovaInstance = createAlova({
8
8
  baseURL: getServiceEndpoint(ServiceType.Patient),
@@ -18,7 +18,5 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
18
18
 
19
19
  mountApis(Apis);
20
20
 
21
+ export * from './implement'
21
22
  export default Apis;
22
-
23
-
24
-
@@ -1,7 +1,7 @@
1
- import type { AnnotationState, TagState } from '@core/api/patient/alova/globals';
1
+ import type { AnnotationState, TagState } from 'src/api/patient/alova/globals';
2
2
  import type { IBuilder } from 'builder-pattern';
3
3
  import { Builder } from 'builder-pattern';
4
- export class Page<T>{
4
+ export class Page<T> {
5
5
  data: T[] = [];
6
6
  total: number = 0;
7
7
  page: number = 0;
@@ -11,22 +11,22 @@ export class Page<T>{
11
11
  }
12
12
  abstract class NetworkObject {
13
13
  static _default: typeof NetworkObject = NetworkObject;
14
- static builder(): IBuilder<unknown>{
15
- return Builder(this._default)
14
+ static builder(): IBuilder<unknown> {
15
+ return Builder(this._default);
16
16
  }
17
- static default(): typeof NetworkObject{
18
- return NetworkObject
17
+ static default(): typeof NetworkObject {
18
+ return NetworkObject;
19
19
  }
20
- abstract of(json: unknown): Promise<this>
21
- abstract state(): unknown
20
+ abstract of(json: unknown): Promise<this>;
21
+ abstract state(): unknown;
22
22
  }
23
23
 
24
- class Annotation extends NetworkObject{
24
+ class Annotation extends NetworkObject {
25
25
  value: string = '';
26
26
  actor: string = '';
27
27
  timestamp: string = '';
28
- static override builder(): IBuilder<Annotation>{
29
- return Builder(Annotation) as unknown as IBuilder<Annotation>
28
+ static override builder(): IBuilder<Annotation> {
29
+ return Builder(Annotation) as unknown as IBuilder<Annotation>;
30
30
  }
31
31
  constructor(value: string = '', actor: string = '', timestamp: string = '') {
32
32
  super();
@@ -38,64 +38,69 @@ class Annotation extends NetworkObject{
38
38
  this.value = json.value!;
39
39
  this.actor = json.actor!;
40
40
  this.timestamp = json.timestamp!;
41
- return Promise.resolve(this)
41
+ return Promise.resolve(this);
42
42
  }
43
43
  override state(): AnnotationState {
44
44
  return {
45
45
  value: this.value,
46
46
  actor: this.actor,
47
47
  timestamp: this.timestamp,
48
- }
48
+ };
49
49
  }
50
50
  }
51
51
 
52
- class Tag extends NetworkObject{
53
- static override builder(): IBuilder<Tag>{
54
- return Builder(Tag) as unknown as IBuilder<Tag>
52
+ class Tag extends NetworkObject {
53
+ static override builder(): IBuilder<Tag> {
54
+ return Builder(Tag) as unknown as IBuilder<Tag>;
55
55
  }
56
- static override default(): typeof Tag{
57
- return Tag
56
+ static override default(): typeof Tag {
57
+ return Tag;
58
58
  }
59
59
  key: string = '';
60
60
  annotations: Annotation[] = [];
61
- constructor(key: string = '',annotations: Annotation[] = []) {
61
+ constructor(key: string = '', annotations: Annotation[] = []) {
62
62
  super();
63
63
  this.key = key;
64
64
  this.annotations = annotations;
65
65
  }
66
66
  override async of(json: TagState): Promise<this> {
67
67
  this.key = json.key!;
68
- for(const item of json.annotationsState!){
69
- this.annotations.push(await new Annotation().of(item))
68
+ for (const item of json.annotationsState) {
69
+ this.annotations.push(await new Annotation().of(item));
70
70
  }
71
- return this
71
+ return this;
72
72
  }
73
73
  override state(): TagState {
74
74
  return {
75
75
  key: this.key,
76
- annotationsState: this.annotations.map(item => item.state()),
77
- }
76
+ annotationsState: this.annotations.map((item) => item.state()),
77
+ };
78
78
  }
79
- getLastValue(): string{
80
- return this.getLastAnnotation().value
79
+ getLastValue(): string {
80
+ return this.getLastAnnotation().value;
81
81
  }
82
82
  getLastAnnotation(): Annotation {
83
- return this.annotations[this.annotations.length - 1]!;
84
- }
85
- static getValueTagSet(tags: Tag[]): Tag[]{
86
- const filterTag = [] as Tag[]
87
- tags.forEach(tag => {
88
- const key = tag.key
89
- const value = tag.getLastAnnotation().value.slice(0,10)
90
- if(filterTag.find(tag => tag.key == key && tag.getLastAnnotation().value.slice(0,10) == value))return
91
- filterTag.push(tag)
92
- })
93
- return filterTag
83
+ return this.annotations[this.annotations.length - 1];
84
+ }
85
+ static getValueTagSet(tags: Tag[]): Tag[] {
86
+ const filterTag = [] as Tag[];
87
+ tags.forEach((tag) => {
88
+ const key = tag.key;
89
+ const value = tag.getLastAnnotation().value.slice(0, 10);
90
+ if (
91
+ filterTag.find(
92
+ (tag) => tag.key == key && tag.getLastAnnotation().value.slice(0, 10) == value,
93
+ )
94
+ )
95
+ return;
96
+ filterTag.push(tag);
97
+ });
98
+ return filterTag;
94
99
  }
95
100
  assign(tag: Tag) {
96
101
  this.key = tag.key;
97
102
  this.annotations = tag.annotations;
98
- return this
103
+ return this;
99
104
  }
100
105
  }
101
106
 
@@ -103,29 +108,26 @@ class Sequence<T> {
103
108
  data: T[] = [];
104
109
  current: T = {} as T;
105
110
  showed: boolean = false;
106
- constructor(
107
- data: T[] = [],
108
- current: T = {} as T,
109
- ) {
111
+ constructor(data: T[] = [], current: T = {} as T) {
110
112
  this.data = data;
111
113
  this.current = current;
112
114
  }
113
115
  delete(item: T): T {
114
116
  this.data.splice(this.data.indexOf(item), 1);
115
- return item
117
+ return item;
116
118
  }
117
119
  choose(item: T): T {
118
120
  this.current = item;
119
- return item
121
+ return item;
120
122
  }
121
123
  clear(): this {
122
124
  this.data.length = 0;
123
125
  this.current = {} as T;
124
- return this
126
+ return this;
125
127
  }
126
- show(): Sequence<T>{
127
- this.showed = true
128
- return this
128
+ show(): Sequence<T> {
129
+ this.showed = true;
130
+ return this;
129
131
  }
130
132
  }
131
- export { NetworkObject, Tag, Sequence, Annotation }
133
+ export { NetworkObject, Tag, Sequence, Annotation };
@@ -1,4 +1,4 @@
1
1
  export * from './core';
2
2
  export * from './meta';
3
3
  export * from './patient';
4
- export * from './alova/index';
4
+ export * from './alova';