hayun-vite 0.0.3 → 0.1.1
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.
- package/assets/styles-test.css +90 -90
- package/assets/styles.css +90 -90
- package/data/formData1.js +42 -42
- package/data/officesObjStore.js +56 -56
- package/data/patientsObjStore.js +73 -73
- package/data/sampleData.js +94 -94
- package/index.js +11 -11
- package/package.json +1 -1
- package/src/Audiogram/Audiogram.js +194 -197
- package/src/Audiogram/dims.js +83 -83
- package/src/Form/Form.js +268 -276
- package/src/Form/Form_N.js +158 -158
- package/src/Form/Forms-Test.html +124 -124
- package/src/Form/Forms.js +121 -134
- package/src/Form/Header.js +91 -91
- package/src/Form/Reflex.js +141 -141
- package/src/Form/Sections.js +71 -71
- package/src/Form/Speech.js +132 -132
- package/src/Form/TextBox.js +66 -82
- package/src/Form/Tympanogram.js +355 -355
- package/src/Form/formStyles.css +122 -122
- package/src/Form/globalinfo.js +68 -68
- package/src/Form/grid/drawGrid.js +84 -84
- package/src/Form/grid/hideGrid.js +8 -8
- package/src/Form/printForm.js +122 -75
- package/src/Form/templates/combo.js +248 -248
- package/src/Form/templates/dims.js +204 -204
- package/src/Form/templates/rasaAud.js +287 -287
- package/src/Symbol/Symbols.js +29 -29
- package/src/Symbol/createSymbolSVG.js +240 -240
- package/src/Symbol/getAllSymbolsSVG.js +21 -21
- package/src/Symbol/insertSymbol.js +10 -10
- package/src/Symbol/symbolChart.js +47 -47
- package/src/common/putLine.js +16 -16
- package/src/common/putPoint.js +12 -12
- package/src/common/putRect.js +13 -13
- package/src/common/putText.js +17 -16
- package/src/common/putTopLayer.js +17 -17
- package/src/main.js +88 -87
- package/src/note.css +62 -0
- package/src/style.css +152 -157
- package/src/note.html +0 -1
@@ -1,287 +1,287 @@
|
|
1
|
-
import audDims from "../../Audiogram/dims.js";
|
2
|
-
|
3
|
-
|
4
|
-
const templateRasaAud = {
|
5
|
-
name: 'rasa',
|
6
|
-
label: '
|
7
|
-
backgroundImage: 'backgroundImage',
|
8
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
9
|
-
paper: { type: 'A4', case: 'portrait', width: 210, height: 296 },
|
10
|
-
|
11
|
-
// Printable Dimention
|
12
|
-
calc1: function () {
|
13
|
-
this.width = this.paper.width - (this.margin.left + this.margin.right);
|
14
|
-
this.height = this.paper.height - (this.margin.top + this.margin.bottom);
|
15
|
-
let width = this.width;
|
16
|
-
// ابعاد و پدینگ المنت ها
|
17
|
-
// فضای خالی
|
18
|
-
this.blank = {
|
19
|
-
name: 'blank',
|
20
|
-
w: width, h: 21,
|
21
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
22
|
-
display: 'block',
|
23
|
-
}
|
24
|
-
this.blank1 = {
|
25
|
-
name: 'blank',
|
26
|
-
w: width, h: 99,
|
27
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
28
|
-
display: 'block',
|
29
|
-
}
|
30
|
-
this.header = {
|
31
|
-
// hideContext: true,
|
32
|
-
name: 'header',
|
33
|
-
w: width, h: 20,
|
34
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
35
|
-
display: 'block',
|
36
|
-
}
|
37
|
-
this.patient = {
|
38
|
-
hideContext: true, // برچسب ها را ایجاد نمیکند
|
39
|
-
forceInsert: true, // مقادیر مختصات ورودی ها را از آبجکت جداگانه ای میگیرد
|
40
|
-
name: 'patient',
|
41
|
-
w: width, h: 22,
|
42
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
43
|
-
display: 'block',
|
44
|
-
}
|
45
|
-
this.history = {
|
46
|
-
// hideContext: true,
|
47
|
-
name: 'history',
|
48
|
-
w: width, h: 10,
|
49
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
50
|
-
display: 'block',
|
51
|
-
}
|
52
|
-
|
53
|
-
this.RAudiogram = {}
|
54
|
-
Object.assign(this.RAudiogram,
|
55
|
-
audDims[this.name],
|
56
|
-
{
|
57
|
-
name: 'RAudiogram',
|
58
|
-
w: width / 2, h: 100,
|
59
|
-
margin: { left: 17, top: 18.5, right: 17.2, bottom: 11.5 },
|
60
|
-
display: 'inline',
|
61
|
-
});
|
62
|
-
|
63
|
-
this.LAudiogram = {}
|
64
|
-
Object.assign(this.LAudiogram,
|
65
|
-
audDims[this.name],
|
66
|
-
{
|
67
|
-
name: 'LAudiogram',
|
68
|
-
w: width / 2, h: 100, // پهنای سکشن هست
|
69
|
-
margin: { left: 17.7, top: 18.5, right: 16.8, bottom: 11.5 },
|
70
|
-
display: 'block',
|
71
|
-
});
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
this.RSpeech = {
|
76
|
-
name: 'RSpeech',
|
77
|
-
w: width / 2, h: 38.2,
|
78
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
79
|
-
display: 'inline',
|
80
|
-
hideContext: true,
|
81
|
-
forceInsert: true,
|
82
|
-
}
|
83
|
-
this.LSpeech = {
|
84
|
-
name: 'LSpeech',
|
85
|
-
w: width / 2, h: 38.2,
|
86
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
87
|
-
display: 'block',
|
88
|
-
hideContext: true,
|
89
|
-
forceInsert: true,
|
90
|
-
}
|
91
|
-
this.RTympanogram = {
|
92
|
-
name: 'RTympanogram',
|
93
|
-
w: width / 2, h: 60,
|
94
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
95
|
-
display: 'inline',
|
96
|
-
}
|
97
|
-
this.LTympanogram = {
|
98
|
-
name: 'LTympanogram',
|
99
|
-
w: width / 2, h: 60,
|
100
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
101
|
-
display: 'block',
|
102
|
-
}
|
103
|
-
this.RReflex = {
|
104
|
-
name: 'RReflex',
|
105
|
-
w: width / 2, h: 30,
|
106
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
107
|
-
display: 'inline'
|
108
|
-
}
|
109
|
-
this.LReflex = {
|
110
|
-
name: 'LReflex',
|
111
|
-
w: width / 2, h: 30,
|
112
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
113
|
-
display: 'block'
|
114
|
-
}
|
115
|
-
this.report = {
|
116
|
-
name: 'report',
|
117
|
-
w: width, h: 37.4,
|
118
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
119
|
-
display: 'block',
|
120
|
-
hideContext: true,
|
121
|
-
forceInsert: true
|
122
|
-
}
|
123
|
-
this.footer = {
|
124
|
-
name: 'footer',
|
125
|
-
w: width, h: 10,
|
126
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
127
|
-
display: 'block'
|
128
|
-
}
|
129
|
-
},
|
130
|
-
|
131
|
-
calc2: function () {
|
132
|
-
// let dims = this.dims;
|
133
|
-
let width, height;
|
134
|
-
//آیتم های روی این تمپلت
|
135
|
-
// روش جدید محاسبه ابعاد منطقی تر و تمیز تر
|
136
|
-
// Object.assign(this.header, {
|
137
|
-
// width: this.getWidth(this.header),
|
138
|
-
// height: this.getHeight(this.header),
|
139
|
-
// })
|
140
|
-
// New
|
141
|
-
width = this.header.width = this.getWidth(this.header)
|
142
|
-
height = this.header.height = this.getHeight(this.header)
|
143
|
-
|
144
|
-
this.header.elements = [
|
145
|
-
{ type: 'line', x1: 0, y1: height, x2: width, y2: height },
|
146
|
-
{ type: 'text', x: 30, y: 5, value: 'تاریخ :' },
|
147
|
-
]
|
148
|
-
this.header.inputs = [
|
149
|
-
{ name: 'officeName', x: width - 20, y: height - 10 },
|
150
|
-
{ name: 'date', x: 20, y: 5 },
|
151
|
-
]
|
152
|
-
|
153
|
-
width = this.patient.width = this.getWidth(this.patient)
|
154
|
-
this.patient.height = this.getHeight(this.patient)
|
155
|
-
this.patient.elements = [
|
156
|
-
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
157
|
-
{ type: 'text', x: width, y: 5, value: 'نام:' },
|
158
|
-
{ type: 'text', x: width - 30, y: 5, value: 'نام خانوادگی:' },
|
159
|
-
{ type: 'text', x: width - 90, y: 5, value: 'سن:' },
|
160
|
-
{ type: 'text', x: width - 130, y: 5, value: 'ارجاع از:' }
|
161
|
-
]
|
162
|
-
this.patient.inputs = [
|
163
|
-
{ name: 'name', x: width - 5, y: 5 },
|
164
|
-
{ name: 'lastName', x: width - 47, y: 5 },
|
165
|
-
{ name: 'age', x: width - 97, y: 5 },
|
166
|
-
{ name: 'referrer', x: width - 142, y: 5 }
|
167
|
-
]
|
168
|
-
this.patient.forceInputs = [
|
169
|
-
{ name: 'name', x: width - 45, y: 12 },
|
170
|
-
{ name: 'lastName', x: width - 75, y: 12 },
|
171
|
-
{ name: 'age', x: width - 105, y: 12 },
|
172
|
-
{ name: 'referrer', x: width - 150, y: 12 }
|
173
|
-
]
|
174
|
-
|
175
|
-
width = this.history.width = this.getWidth(this.history)
|
176
|
-
this.history.height = this.getHeight(this.history)
|
177
|
-
this.history.elements = [
|
178
|
-
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
179
|
-
{ type: 'text', x: width, y: 5, value: 'شرح حال:' },
|
180
|
-
]
|
181
|
-
this.history.inputs = [
|
182
|
-
{ name: 'description', x: width - 13, y: 5 },
|
183
|
-
]
|
184
|
-
|
185
|
-
width = this.RAudiogram.width = this.getWidth(this.RAudiogram)
|
186
|
-
this.RAudiogram.height = this.getHeight(this.RAudiogram)
|
187
|
-
|
188
|
-
width = this.LAudiogram.width = this.getWidth(this.LAudiogram)
|
189
|
-
this.LAudiogram.height = this.getHeight(this.LAudiogram)
|
190
|
-
|
191
|
-
width = this.RSpeech.width = this.getWidth(this.RSpeech)
|
192
|
-
this.RSpeech.height = this.getHeight(this.RSpeech)
|
193
|
-
this.RSpeech.labels = ["SRT", "MCL", "SDS", 'UCL']
|
194
|
-
this.RSpeech.forceInputs = [
|
195
|
-
{ name: 'SRT', x: 23, y: 26 },
|
196
|
-
{ name: 'MCL', x: 35, y: 26 },
|
197
|
-
{ name: 'SDS', x: 47, y: 26 },
|
198
|
-
{ name: 'UCL', x: 59, y: 26 },
|
199
|
-
]
|
200
|
-
|
201
|
-
width = this.LSpeech.width = this.getWidth(this.LSpeech)
|
202
|
-
this.LSpeech.height = this.getHeight(this.LSpeech)
|
203
|
-
this.LSpeech.labels = ["SRT", "MCL", "SDS", 'UCL']
|
204
|
-
this.LSpeech.forceInputs = [
|
205
|
-
{ name: 'SRT', x: 33, y: 26 },
|
206
|
-
{ name: 'MCL', x: 45, y: 26 },
|
207
|
-
{ name: 'SDS', x: 57, y: 26 },
|
208
|
-
{ name: 'UCL', x: 69, y: 26 },
|
209
|
-
]
|
210
|
-
|
211
|
-
width = this.RTympanogram.width = this.getWidth(this.RTympanogram)
|
212
|
-
this.RTympanogram.height = this.getHeight(this.RTympanogram)
|
213
|
-
width = this.LTympanogram.width = this.getWidth(this.LTympanogram)
|
214
|
-
this.LTympanogram.height = this.getHeight(this.LTympanogram)
|
215
|
-
|
216
|
-
width = this.RReflex.width = this.getWidth(this.RReflex)
|
217
|
-
this.RReflex.height = this.getHeight(this.RReflex)
|
218
|
-
width = this.LReflex.width = this.getWidth(this.LReflex)
|
219
|
-
this.LReflex.height = this.getHeight(this.LReflex)
|
220
|
-
|
221
|
-
width = this.report.width = this.getWidth(this.report)
|
222
|
-
this.report.height = this.getHeight(this.report)
|
223
|
-
this.report.elements = [
|
224
|
-
{ type: 'text', x: width, y: 5, value: 'گزارش:' },
|
225
|
-
]
|
226
|
-
this.report.inputs = [
|
227
|
-
{ name: 'description', x: width - 10, y: 5 },
|
228
|
-
]
|
229
|
-
this.report.forceInputs = [
|
230
|
-
{ name: 'description', x: width - 20, y: 14 },
|
231
|
-
|
232
|
-
]
|
233
|
-
|
234
|
-
|
235
|
-
width = this.footer.width = this.getWidth(this.footer)
|
236
|
-
this.footer.height = this.getHeight(this.footer)
|
237
|
-
this.footer.elements = [
|
238
|
-
{ type: 'line', x1: 0, y1: 0, x2: width, y2: 0 },
|
239
|
-
{ type: 'text', x: width, y: 5, value: 'آدرس:' },
|
240
|
-
{ type: 'text', x: width - 120, y: 5, value: 'تلفن:' },
|
241
|
-
]
|
242
|
-
this.footer.inputs = [
|
243
|
-
{ name: 'address', x: width - 10, y: 5 },
|
244
|
-
{ name: 'tel', x: width - 128, y: 5 },
|
245
|
-
]
|
246
|
-
},
|
247
|
-
|
248
|
-
|
249
|
-
getWidth: function (element) {
|
250
|
-
return (element.w - (element.margin.left + element.margin.right))
|
251
|
-
},
|
252
|
-
getHeight: function (element) {
|
253
|
-
return (element.h - (element.margin.top + element.margin.bottom))
|
254
|
-
},
|
255
|
-
|
256
|
-
calcSectionsArray: function () {
|
257
|
-
// این آرایه دقیقا ترتیب قرارگیری سکشن ها را بدون اون اوردر قبلی تعیین میکند
|
258
|
-
this.sections = [
|
259
|
-
|
260
|
-
// this.blank,
|
261
|
-
this.blank,
|
262
|
-
this.patient,
|
263
|
-
// this.blank1,
|
264
|
-
|
265
|
-
// this.history,
|
266
|
-
this.RAudiogram,
|
267
|
-
this.LAudiogram,
|
268
|
-
this.RSpeech, this.LSpeech,
|
269
|
-
// this.RTympanogram, this.LTympanogram,
|
270
|
-
// this.RReflex, this.LReflex,
|
271
|
-
this.report,
|
272
|
-
// this.footer
|
273
|
-
|
274
|
-
]
|
275
|
-
},
|
276
|
-
|
277
|
-
|
278
|
-
}
|
279
|
-
|
280
|
-
templateRasaAud.calc1()
|
281
|
-
templateRasaAud.calc2()
|
282
|
-
templateRasaAud.calcSectionsArray()
|
283
|
-
|
284
|
-
// پهنا و ارتفاع قابل استفاده منهای پد ها میشه پهنا و ارتفاع اصلی
|
285
|
-
|
286
|
-
export default templateRasaAud;
|
287
|
-
|
1
|
+
import audDims from "../../Audiogram/dims.js";
|
2
|
+
|
3
|
+
|
4
|
+
const templateRasaAud = {
|
5
|
+
name: 'rasa',
|
6
|
+
label: 'ادیومتری رسا',
|
7
|
+
backgroundImage: 'backgroundImage',
|
8
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
9
|
+
paper: { type: 'A4', case: 'portrait', width: 210, height: 296 },
|
10
|
+
|
11
|
+
// Printable Dimention
|
12
|
+
calc1: function () {
|
13
|
+
this.width = this.paper.width - (this.margin.left + this.margin.right);
|
14
|
+
this.height = this.paper.height - (this.margin.top + this.margin.bottom);
|
15
|
+
let width = this.width;
|
16
|
+
// ابعاد و پدینگ المنت ها
|
17
|
+
// فضای خالی
|
18
|
+
this.blank = {
|
19
|
+
name: 'blank',
|
20
|
+
w: width, h: 21,
|
21
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
22
|
+
display: 'block',
|
23
|
+
}
|
24
|
+
this.blank1 = {
|
25
|
+
name: 'blank',
|
26
|
+
w: width, h: 99,
|
27
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
28
|
+
display: 'block',
|
29
|
+
}
|
30
|
+
this.header = {
|
31
|
+
// hideContext: true,
|
32
|
+
name: 'header',
|
33
|
+
w: width, h: 20,
|
34
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
35
|
+
display: 'block',
|
36
|
+
}
|
37
|
+
this.patient = {
|
38
|
+
hideContext: true, // برچسب ها را ایجاد نمیکند
|
39
|
+
forceInsert: true, // مقادیر مختصات ورودی ها را از آبجکت جداگانه ای میگیرد
|
40
|
+
name: 'patient',
|
41
|
+
w: width, h: 22,
|
42
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
43
|
+
display: 'block',
|
44
|
+
}
|
45
|
+
this.history = {
|
46
|
+
// hideContext: true,
|
47
|
+
name: 'history',
|
48
|
+
w: width, h: 10,
|
49
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
50
|
+
display: 'block',
|
51
|
+
}
|
52
|
+
|
53
|
+
this.RAudiogram = {}
|
54
|
+
Object.assign(this.RAudiogram,
|
55
|
+
audDims[this.name],
|
56
|
+
{
|
57
|
+
name: 'RAudiogram',
|
58
|
+
w: width / 2, h: 100,
|
59
|
+
margin: { left: 17, top: 18.5, right: 17.2, bottom: 11.5 },
|
60
|
+
display: 'inline',
|
61
|
+
});
|
62
|
+
|
63
|
+
this.LAudiogram = {}
|
64
|
+
Object.assign(this.LAudiogram,
|
65
|
+
audDims[this.name],
|
66
|
+
{
|
67
|
+
name: 'LAudiogram',
|
68
|
+
w: width / 2, h: 100, // پهنای سکشن هست
|
69
|
+
margin: { left: 17.7, top: 18.5, right: 16.8, bottom: 11.5 },
|
70
|
+
display: 'block',
|
71
|
+
});
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
this.RSpeech = {
|
76
|
+
name: 'RSpeech',
|
77
|
+
w: width / 2, h: 38.2,
|
78
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
79
|
+
display: 'inline',
|
80
|
+
hideContext: true,
|
81
|
+
forceInsert: true,
|
82
|
+
}
|
83
|
+
this.LSpeech = {
|
84
|
+
name: 'LSpeech',
|
85
|
+
w: width / 2, h: 38.2,
|
86
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
87
|
+
display: 'block',
|
88
|
+
hideContext: true,
|
89
|
+
forceInsert: true,
|
90
|
+
}
|
91
|
+
this.RTympanogram = {
|
92
|
+
name: 'RTympanogram',
|
93
|
+
w: width / 2, h: 60,
|
94
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
95
|
+
display: 'inline',
|
96
|
+
}
|
97
|
+
this.LTympanogram = {
|
98
|
+
name: 'LTympanogram',
|
99
|
+
w: width / 2, h: 60,
|
100
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
101
|
+
display: 'block',
|
102
|
+
}
|
103
|
+
this.RReflex = {
|
104
|
+
name: 'RReflex',
|
105
|
+
w: width / 2, h: 30,
|
106
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
107
|
+
display: 'inline'
|
108
|
+
}
|
109
|
+
this.LReflex = {
|
110
|
+
name: 'LReflex',
|
111
|
+
w: width / 2, h: 30,
|
112
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
113
|
+
display: 'block'
|
114
|
+
}
|
115
|
+
this.report = {
|
116
|
+
name: 'report',
|
117
|
+
w: width, h: 37.4,
|
118
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
119
|
+
display: 'block',
|
120
|
+
hideContext: true,
|
121
|
+
forceInsert: true
|
122
|
+
}
|
123
|
+
this.footer = {
|
124
|
+
name: 'footer',
|
125
|
+
w: width, h: 10,
|
126
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
127
|
+
display: 'block'
|
128
|
+
}
|
129
|
+
},
|
130
|
+
|
131
|
+
calc2: function () {
|
132
|
+
// let dims = this.dims;
|
133
|
+
let width, height;
|
134
|
+
//آیتم های روی این تمپلت
|
135
|
+
// روش جدید محاسبه ابعاد منطقی تر و تمیز تر
|
136
|
+
// Object.assign(this.header, {
|
137
|
+
// width: this.getWidth(this.header),
|
138
|
+
// height: this.getHeight(this.header),
|
139
|
+
// })
|
140
|
+
// New
|
141
|
+
width = this.header.width = this.getWidth(this.header)
|
142
|
+
height = this.header.height = this.getHeight(this.header)
|
143
|
+
|
144
|
+
this.header.elements = [
|
145
|
+
{ type: 'line', x1: 0, y1: height, x2: width, y2: height },
|
146
|
+
{ type: 'text', x: 30, y: 5, value: 'تاریخ :' },
|
147
|
+
]
|
148
|
+
this.header.inputs = [
|
149
|
+
{ name: 'officeName', x: width - 20, y: height - 10 },
|
150
|
+
{ name: 'date', x: 20, y: 5 },
|
151
|
+
]
|
152
|
+
|
153
|
+
width = this.patient.width = this.getWidth(this.patient)
|
154
|
+
this.patient.height = this.getHeight(this.patient)
|
155
|
+
this.patient.elements = [
|
156
|
+
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
157
|
+
{ type: 'text', x: width, y: 5, value: 'نام:' },
|
158
|
+
{ type: 'text', x: width - 30, y: 5, value: 'نام خانوادگی:' },
|
159
|
+
{ type: 'text', x: width - 90, y: 5, value: 'سن:' },
|
160
|
+
{ type: 'text', x: width - 130, y: 5, value: 'ارجاع از:' }
|
161
|
+
]
|
162
|
+
this.patient.inputs = [
|
163
|
+
{ name: 'name', x: width - 5, y: 5 },
|
164
|
+
{ name: 'lastName', x: width - 47, y: 5 },
|
165
|
+
{ name: 'age', x: width - 97, y: 5 },
|
166
|
+
{ name: 'referrer', x: width - 142, y: 5 }
|
167
|
+
]
|
168
|
+
this.patient.forceInputs = [
|
169
|
+
{ name: 'name', x: width - 45, y: 12 },
|
170
|
+
{ name: 'lastName', x: width - 75, y: 12 },
|
171
|
+
{ name: 'age', x: width - 105, y: 12 },
|
172
|
+
{ name: 'referrer', x: width - 150, y: 12 }
|
173
|
+
]
|
174
|
+
|
175
|
+
width = this.history.width = this.getWidth(this.history)
|
176
|
+
this.history.height = this.getHeight(this.history)
|
177
|
+
this.history.elements = [
|
178
|
+
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
179
|
+
{ type: 'text', x: width, y: 5, value: 'شرح حال:' },
|
180
|
+
]
|
181
|
+
this.history.inputs = [
|
182
|
+
{ name: 'description', x: width - 13, y: 5 },
|
183
|
+
]
|
184
|
+
|
185
|
+
width = this.RAudiogram.width = this.getWidth(this.RAudiogram)
|
186
|
+
this.RAudiogram.height = this.getHeight(this.RAudiogram)
|
187
|
+
|
188
|
+
width = this.LAudiogram.width = this.getWidth(this.LAudiogram)
|
189
|
+
this.LAudiogram.height = this.getHeight(this.LAudiogram)
|
190
|
+
|
191
|
+
width = this.RSpeech.width = this.getWidth(this.RSpeech)
|
192
|
+
this.RSpeech.height = this.getHeight(this.RSpeech)
|
193
|
+
this.RSpeech.labels = ["SRT", "MCL", "SDS", 'UCL']
|
194
|
+
this.RSpeech.forceInputs = [
|
195
|
+
{ name: 'SRT', x: 23, y: 26 },
|
196
|
+
{ name: 'MCL', x: 35, y: 26 },
|
197
|
+
{ name: 'SDS', x: 47, y: 26 },
|
198
|
+
{ name: 'UCL', x: 59, y: 26 },
|
199
|
+
]
|
200
|
+
|
201
|
+
width = this.LSpeech.width = this.getWidth(this.LSpeech)
|
202
|
+
this.LSpeech.height = this.getHeight(this.LSpeech)
|
203
|
+
this.LSpeech.labels = ["SRT", "MCL", "SDS", 'UCL']
|
204
|
+
this.LSpeech.forceInputs = [
|
205
|
+
{ name: 'SRT', x: 33, y: 26 },
|
206
|
+
{ name: 'MCL', x: 45, y: 26 },
|
207
|
+
{ name: 'SDS', x: 57, y: 26 },
|
208
|
+
{ name: 'UCL', x: 69, y: 26 },
|
209
|
+
]
|
210
|
+
|
211
|
+
width = this.RTympanogram.width = this.getWidth(this.RTympanogram)
|
212
|
+
this.RTympanogram.height = this.getHeight(this.RTympanogram)
|
213
|
+
width = this.LTympanogram.width = this.getWidth(this.LTympanogram)
|
214
|
+
this.LTympanogram.height = this.getHeight(this.LTympanogram)
|
215
|
+
|
216
|
+
width = this.RReflex.width = this.getWidth(this.RReflex)
|
217
|
+
this.RReflex.height = this.getHeight(this.RReflex)
|
218
|
+
width = this.LReflex.width = this.getWidth(this.LReflex)
|
219
|
+
this.LReflex.height = this.getHeight(this.LReflex)
|
220
|
+
|
221
|
+
width = this.report.width = this.getWidth(this.report)
|
222
|
+
this.report.height = this.getHeight(this.report)
|
223
|
+
this.report.elements = [
|
224
|
+
{ type: 'text', x: width, y: 5, value: 'گزارش:' },
|
225
|
+
]
|
226
|
+
this.report.inputs = [
|
227
|
+
{ name: 'description', x: width - 10, y: 5 },
|
228
|
+
]
|
229
|
+
this.report.forceInputs = [
|
230
|
+
{ name: 'description', x: width - 20, y: 14 },
|
231
|
+
|
232
|
+
]
|
233
|
+
|
234
|
+
|
235
|
+
width = this.footer.width = this.getWidth(this.footer)
|
236
|
+
this.footer.height = this.getHeight(this.footer)
|
237
|
+
this.footer.elements = [
|
238
|
+
{ type: 'line', x1: 0, y1: 0, x2: width, y2: 0 },
|
239
|
+
{ type: 'text', x: width, y: 5, value: 'آدرس:' },
|
240
|
+
{ type: 'text', x: width - 120, y: 5, value: 'تلفن:' },
|
241
|
+
]
|
242
|
+
this.footer.inputs = [
|
243
|
+
{ name: 'address', x: width - 10, y: 5 },
|
244
|
+
{ name: 'tel', x: width - 128, y: 5 },
|
245
|
+
]
|
246
|
+
},
|
247
|
+
|
248
|
+
|
249
|
+
getWidth: function (element) {
|
250
|
+
return (element.w - (element.margin.left + element.margin.right))
|
251
|
+
},
|
252
|
+
getHeight: function (element) {
|
253
|
+
return (element.h - (element.margin.top + element.margin.bottom))
|
254
|
+
},
|
255
|
+
|
256
|
+
calcSectionsArray: function () {
|
257
|
+
// این آرایه دقیقا ترتیب قرارگیری سکشن ها را بدون اون اوردر قبلی تعیین میکند
|
258
|
+
this.sections = [
|
259
|
+
|
260
|
+
// this.blank,
|
261
|
+
this.blank,
|
262
|
+
this.patient,
|
263
|
+
// this.blank1,
|
264
|
+
|
265
|
+
// this.history,
|
266
|
+
this.RAudiogram,
|
267
|
+
this.LAudiogram,
|
268
|
+
this.RSpeech, this.LSpeech,
|
269
|
+
// this.RTympanogram, this.LTympanogram,
|
270
|
+
// this.RReflex, this.LReflex,
|
271
|
+
this.report,
|
272
|
+
// this.footer
|
273
|
+
|
274
|
+
]
|
275
|
+
},
|
276
|
+
|
277
|
+
|
278
|
+
}
|
279
|
+
|
280
|
+
templateRasaAud.calc1()
|
281
|
+
templateRasaAud.calc2()
|
282
|
+
templateRasaAud.calcSectionsArray()
|
283
|
+
|
284
|
+
// پهنا و ارتفاع قابل استفاده منهای پد ها میشه پهنا و ارتفاع اصلی
|
285
|
+
|
286
|
+
export default templateRasaAud;
|
287
|
+
|
package/src/Symbol/Symbols.js
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
// A Class for both R & L at same time.
|
2
|
-
import getAllSymbolsSVG from "./getAllSymbolsSVG.js";
|
3
|
-
import symbolChart from "./symbolChart.js";
|
4
|
-
|
5
|
-
class Symbols {
|
6
|
-
constructor() {
|
7
|
-
// یک آبجکت از ناداسویجی همه سمبلها
|
8
|
-
this.symbolsSVG = getAllSymbolsSVG();
|
9
|
-
this.chart = {}
|
10
|
-
this.selected = { R: "R_AC", L: "L_AC" }
|
11
|
-
}
|
12
|
-
|
13
|
-
draw({ container, side, events = true }) {
|
14
|
-
|
15
|
-
this.chart[side] = symbolChart({ container: container, side: side, symbols: this.symbolsSVG, x: 0, y: 0 , w:700 });
|
16
|
-
this.selected[side] = side + "_AC"; // default Selected symbol
|
17
|
-
if (events) this.act(side);
|
18
|
-
}
|
19
|
-
|
20
|
-
// enable and set events on sybol chart
|
21
|
-
act(side) {
|
22
|
-
this.chart[side].addEventListener("click", (e) => {
|
23
|
-
let v = e.target.getAttribute("data-name"); // Symbol Name earned
|
24
|
-
// suddenly null ignored
|
25
|
-
if (v) this.selected[side] = v; // Active symbol or so Selected Symbol
|
26
|
-
})
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
1
|
+
// A Class for both R & L at same time.
|
2
|
+
import getAllSymbolsSVG from "./getAllSymbolsSVG.js";
|
3
|
+
import symbolChart from "./symbolChart.js";
|
4
|
+
|
5
|
+
class Symbols {
|
6
|
+
constructor() {
|
7
|
+
// یک آبجکت از ناداسویجی همه سمبلها
|
8
|
+
this.symbolsSVG = getAllSymbolsSVG();
|
9
|
+
this.chart = {}
|
10
|
+
this.selected = { R: "R_AC", L: "L_AC" }
|
11
|
+
}
|
12
|
+
|
13
|
+
draw({ container, side, events = true }) {
|
14
|
+
|
15
|
+
this.chart[side] = symbolChart({ container: container, side: side, symbols: this.symbolsSVG, x: 0, y: 0 , w:700 });
|
16
|
+
this.selected[side] = side + "_AC"; // default Selected symbol
|
17
|
+
if (events) this.act(side);
|
18
|
+
}
|
19
|
+
|
20
|
+
// enable and set events on sybol chart
|
21
|
+
act(side) {
|
22
|
+
this.chart[side].addEventListener("click", (e) => {
|
23
|
+
let v = e.target.getAttribute("data-name"); // Symbol Name earned
|
24
|
+
// suddenly null ignored
|
25
|
+
if (v) this.selected[side] = v; // Active symbol or so Selected Symbol
|
26
|
+
})
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
30
|
export default Symbols;
|