hayun-vite 0.10.1 → 0.11.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.
Files changed (37) hide show
  1. package/assets/data/sampleData.js +10 -2
  2. package/assets/templates/mainTemplate.js +128 -0
  3. package/assets/templates/template_combo.js +49 -44
  4. package/package.json +1 -1
  5. package/src/Audiogram/Audiogram.js +43 -21
  6. package/src/Audiogram/Audiogram_100.js +499 -0
  7. package/src/Audiogram/Audiogram_box.js +483 -0
  8. package/src/Audiogram/dims.js +4 -80
  9. package/src/Audiogram/dims_100.js +51 -0
  10. package/src/Audiogram/dims_box.js +125 -0
  11. package/src/Form/Form.js +38 -42
  12. package/src/Form/Form_N.js +194 -0
  13. package/src/Form/Forms.js +0 -2
  14. package/src/Form/Sections.js +0 -6
  15. package/src/Form/Sections_N.js +66 -0
  16. package/src/{Form → Header}/Header.js +1 -4
  17. package/src/Header/Header_N.js +72 -0
  18. package/src/{Form/Box.js → MultiText/MultiText.js} +42 -25
  19. package/src/MultiText/MultiText_N.js +37 -0
  20. package/src/{Form/Reflex_N.js → Reflex/Reflex.js} +17 -4
  21. package/src/Reflex/units.js +65 -0
  22. package/src/{Form/Speech_N.js → Speech/Speech.js} +47 -30
  23. package/src/Speech/Speech_N.js +125 -0
  24. package/src/Speech/units.js +31 -0
  25. package/src/{Form → Tympanogram}/Tympanogram.js +39 -69
  26. package/src/Tympanogram/units.js +76 -0
  27. package/src/common/{putTextBox.js → putCell.js} +6 -6
  28. package/src/common/putG.js +10 -0
  29. package/src/common/putLine.js +1 -1
  30. package/src/common/putText.js +5 -4
  31. package/src/main.js +192 -19
  32. package/assets/fonts/Vazirmatn-Regular.woff2 +0 -0
  33. package/assets/styles-test.css +0 -86
  34. package/assets/styles.css +0 -86
  35. package/src/Form/Reflex.js +0 -145
  36. package/src/Form/Speech.js +0 -121
  37. package/src/Form/globalinfo.js +0 -68
@@ -1,14 +1,17 @@
1
1
  import putRect from "../common/putRect.js";
2
+ import putSVG from "../common/putSVG.js";
2
3
  import putText from "../common/putText.js";
4
+ import units from "./units.js";
3
5
  const svgNS = "http://www.w3.org/2000/svg";
4
6
 
5
7
  export default class Tympanogram {
6
- constructor({ container, side }) {
8
+ constructor({ container, side, dims }) {
7
9
  this.pressure = { min: -600, max: +400, step: 200 };
8
10
  this.compliance = { min: -0.50, max: 3, step: 0.50 };
9
11
  this.padding = { right: 5, left: 8, top: 7, bottom: 14 };
10
12
  this.container = container;
11
13
  this.side = side
14
+ this.draw({dims})
12
15
  }
13
16
 
14
17
  draw({ dims }) {
@@ -16,23 +19,23 @@ export default class Tympanogram {
16
19
  let height = dims.height;
17
20
  let x = dims.margin.left;
18
21
  let y = dims.margin.top;
19
- // const labels = items.labels;
22
+ let style;
20
23
 
21
24
  const { pressure, compliance, padding } = {
22
25
  pressure: this.pressure,
23
26
  compliance: this.compliance,
24
27
  padding: this.padding,
28
+ }
25
29
 
26
- };
27
- const svg = document.createElementNS(svgNS, "svg");
28
- svg.setAttribute("data-name", "R_Tymp");
29
- svg.setAttribute("width", width);
30
- svg.setAttribute("height", height);
31
- svg.setAttribute("x", x);
32
- svg.setAttribute("y", y);
33
- svg.setAttribute("viewBox", [-padding.left, -padding.top, width, height]);
34
-
30
+ let { styles, vbWidth, vbHeight } = units;
35
31
 
32
+ // کل چارت
33
+ vbHeight = (vbWidth * height) / width // متناسب سازی ارتفاع ویباکس با پهنا و ارتفاع ورودی
34
+ const viewBox = [-padding.left, -padding.top, vbWidth, vbHeight].join(' ');
35
+ const svg = putSVG({ x, y, width, height, viewBox })
36
+ // این خط شد دو خط کد طلایی که مشکل سایز فونت در دیسپلی و کاغذ رو حل کرد
37
+ width = vbWidth; // ثابت می‌ماند همیشه
38
+ height = vbHeight // با نسبت پهنا و ارتفاع ورودی تغییر میکند
36
39
 
37
40
  const pressureAxiosLength = {
38
41
  dapa: pressure.max - pressure.min,
@@ -44,17 +47,16 @@ export default class Tympanogram {
44
47
  mm: height - padding.top - padding.bottom
45
48
  }
46
49
 
47
- this.chartInfo = { pressure, compliance, padding, pressureAxiosLength, complianceAxiosLength };
50
+ this.chartInfo = { pressure, compliance, padding, pressureAxiosLength, complianceAxiosLength }
48
51
 
49
52
  // point({ this.container: svg, x: getX(pressure.min), y: getY(compliance.max), color: 'red' });
50
53
  // point({ this.container: svg, x: getX(pressure.max), y: getY(compliance.min), color: 'green' });
51
54
  // point({ this.container: svg, x: getX(pressure.min), y: getY(compliance.min), color: 'brown' });
52
- let style;
53
55
  // Pressure Axios (Horizontal)
54
56
  style = `
55
57
  stroke-width: 0.15mm;
56
58
  stroke: black;
57
- `;
59
+ `;
58
60
  putLine({
59
61
  x1: getX(pressure.min), y1: getY(compliance.min),
60
62
  x2: getX(pressure.max), y2: getY(compliance.min), style: style
@@ -70,109 +72,87 @@ export default class Tympanogram {
70
72
  stroke: black;
71
73
  stroke-dasharray: 0.4;
72
74
  stroke-opacity: 0.5;
73
- `;
75
+ `;
74
76
  putLine({
75
77
  x1: getX(0), y1: getY(compliance.min),
76
78
  x2: getX(0), y2: getY(compliance.max), style: style
77
- })
79
+ });
80
+
78
81
  // Compliance Zero Line
79
82
  putLine({
80
83
  x1: getX(pressure.min), y1: getY(0),
81
84
  x2: getX(pressure.max), y2: getY(0), style: style
82
- })
85
+ });
83
86
 
84
87
  // Captions:
85
- style = `
86
- user-select: none;
87
- direction: ltr !important;
88
- /* text-align: center; */
89
- font-family: Arial, Helvetica, sans-serif !important;
90
- font-size: 0.8mm;
91
- text-anchor: middle; /*تراز افقی*/
92
- dominant-baseline: middle; /* تراز عمودی*/
93
- `;
88
+ style = styles.caption;
89
+
94
90
  putText({
95
- container: svg, value: "Compliance (ml)", style: style,
91
+ container: svg, value: "Compliance (ml)", style,
96
92
  x: getX(pressure.min), y: getY(compliance.max), dx: 5, dy: -3
97
93
  });
94
+
98
95
  putText({
99
96
  container: svg, value: "Pressure (dapa)", style: style,
100
97
  x: getX(pressure.max), y: getY(compliance.min), dx: -8, dy: 6,
101
98
  });
102
- style = `
103
- user-select: none;
104
- direction: ltr !important;
105
- /* text-align: center; */
106
- font-family: Arial, Helvetica, sans-serif !important;
107
- font-size: 1mm;
108
- text-anchor: start; /*تراز افقی*/
109
- dominant-baseline: middle; /* تراز عمودی*/
110
- `;
99
+
100
+ style = styles.label;
111
101
  let color = (this.side === 'R') ? 'red' : 'blue';
112
102
 
113
103
  putText({
114
104
  container: svg, value: "ECV:", style: style,
115
105
  x: getX(pressure.min), y: getY(compliance.min), dy: 10
116
106
  });
107
+
117
108
  putText({
118
109
  container: svg, value: "", style: style + 'fill: ' + color, name: 'ECV',
119
110
  x: getX(pressure.min), y: getY(compliance.min), dy: 10, dx: 11
120
111
  });
112
+
121
113
  putText({
122
114
  container: svg, value: "MEP:", style: style,
123
115
  x: getX(-300), y: getY(compliance.min), dy: 10
124
116
  });
117
+
125
118
  putText({
126
119
  container: svg, value: "", style: style + 'fill: ' + color, name: 'MEP',
127
120
  x: getX(-300), y: getY(compliance.min), dy: 10, dx: 11
128
121
  });
122
+
129
123
  putText({
130
124
  container: svg, value: "SC:", style: style,
131
125
  x: getX(0), y: getY(compliance.min), dy: 10
132
126
  });
127
+
133
128
  putText({
134
129
  container: svg, value: "", style: style + 'fill: ' + color, name: 'SC',
135
130
  x: getX(0), y: getY(compliance.min), dy: 10, dx: 8
136
131
  });
132
+
137
133
  putText({
138
134
  container: svg, value: "G:", style: style,
139
135
  x: getX(280), y: getY(compliance.min), dy: 10
140
136
  });
137
+
141
138
  putText({
142
139
  container: svg, value: "", style: style + 'fill: ' + color, name: 'G',
143
140
  x: getX(300), y: getY(compliance.min), dy: 10, dx: 4
144
141
  });
145
142
 
146
- style = `
147
- user-select: none;
148
- direction: ltr !important;
149
- /* text-align: center; */
150
- font-family: Arial, Helvetica, sans-serif !important;
151
- font-size: 1mm;
152
- font-weight: bold;
153
- text-anchor: start; /*تراز افقی*/
154
- dominant-baseline: middle; /* تراز عمودی*/
155
- `;
143
+ style = styles.type;
156
144
  putText({
157
145
  container: svg, value: "Type", style: style + 'fill: ' + color,
158
146
  x: getX(-500), y: getY(2.5),
159
147
  });
148
+
160
149
  putText({
161
150
  container: svg, value: "", style: style + 'fill: ' + color, name: 'Type',
162
151
  x: getX(-500), y: getY(2.5), dx: 9
163
152
  });
164
153
 
165
154
  // Compliance Axios digits
166
- style = `
167
- user-select: none;
168
- direction: ltr !important;
169
- /* text-align: center; */
170
- font-family: Arial, Helvetica, sans-serif !important;
171
- font-size: 0.7mm;
172
- text-anchor: end; /*تراز افقی*/
173
- dominant-baseline: middle; /* تراز عمودی*/
174
-
175
- `;
155
+ style = styles.compliance;
176
156
  x = getX(pressure.min);
177
157
  for (let c = compliance.min + compliance.step; c <= compliance.max; c += compliance.step) {
178
158
  c = Math.round(c * 10) / 10 // برای اون پدیده اعشاری غیرمنتظر
@@ -184,22 +164,13 @@ export default class Tympanogram {
184
164
  }
185
165
 
186
166
  // Pressure Axios digits
187
- style = `
188
- user-select: none;
189
- direction: ltr !important;
190
- /* text-align: center; */
191
- font-family: Arial, Helvetica, sans-serif !important;
192
- font-size: 0.7mm;
193
- text-anchor: middle; /*تراز افقی*/
194
- dominant-baseline: hanging; /* تراز عمودی*/
195
- `;
167
+ style = styles.pressure;
196
168
  for (let p = pressure.min; p <= pressure.max; p += pressure.step) {
197
169
  putText({
198
170
  container: svg, value: p,
199
171
  x: getX(p), y: getY(compliance.min), dy: 1,
200
- style: style,
172
+ style,
201
173
  });
202
-
203
174
  }
204
175
 
205
176
  // console.log(this.container);
@@ -258,7 +229,6 @@ export default class Tympanogram {
258
229
  this.chart.querySelector(`path[data-name="curve"]`)?.remove();
259
230
  // رسم منحنی
260
231
  this.drawCurve(data);
261
-
262
232
  }
263
233
 
264
234
  // توابع داخلی
@@ -274,7 +244,7 @@ export default class Tympanogram {
274
244
  // data.SC = 0.5;
275
245
  // data.MEP = -75;
276
246
  // با توجه به اندازه اس ‌سی میشه برای مقادیر زیر یک سری رل گذاشت با منحنی قشنگ تر باشد
277
- let cp = 50; // جابجایی نقطه کنترل منحنی های راست و چپ روی محور افقی
247
+ let cp = 70; // جابجایی نقطه کنترل منحنی های راست و چپ روی محور افقی
278
248
  // let k = 0.5; // width and height change [0, 1]
279
249
  let cpp = 5; //جابجایی نقطه کنترل قله ها روی محور افقی
280
250
  // رل‌هایی برای تغییر مقادیر بالا برای زیبایی بیشتر منحنی در نقطه قله
@@ -0,0 +1,76 @@
1
+ const units = {
2
+ name: 'Tympanogram',
3
+ margin: { left: 0, top: 0, }, // در کانتینر دیو این عمل نمیکنه. مگر در کانتینر اس وی جی بذاریم
4
+
5
+ // واحد ویوباکس - بدون واحد
6
+ vbWidth: 100, // برای اینکه ضخامت خطوط تغییری ناهنجار نکند این ثابت میماند
7
+ vbHeight: 60, // این به نسبت تغییر می‌کند
8
+
9
+ // واحد پیکسل، میلیمتر، ...
10
+ // اگر واحد پایینی توسط بیرون تغییر کرد واحدهای بالایی باید با نسبت پایینی تغییر کنند
11
+ width: 100,
12
+ height: 60,
13
+
14
+ // این فاصله خطوط محورهای بالا و چپ ادیوگرام از لبه ها هست
15
+ chartPadding: { left: 40, top: 40, right: 30, bottom: 20 },
16
+ symbolDims: { width: 55, height: 55 },
17
+ symbolsChart: {
18
+ width: 240, height: 60
19
+ },
20
+ // virtual frequency
21
+ mainFrequencies: [125, 250, 500, 1000, 2000, 4000, 8000],
22
+
23
+ intensity: { min: -20, max: 130, step: 10 },
24
+
25
+ styles: {
26
+ pressure: `
27
+ user-select: none;
28
+ direction: ltr !important;
29
+ font-family: Vazir;
30
+ font-size: 3;
31
+ text-anchor: middle;
32
+ dominant-baseline: hanging;
33
+ `,
34
+ caption: `
35
+ user-select: none;
36
+ direction: ltr !important;
37
+ font-family: Vazir;
38
+ font-size: 3;
39
+ text-anchor: middle;
40
+ dominant-baseline: middle;
41
+ `,
42
+ label: `
43
+ user-select: none;
44
+ direction: ltr !important;
45
+ font-family: Vazir;
46
+ font-size: 1mm;
47
+ text-anchor: start;
48
+ dominant-baseline: middle;
49
+ `,
50
+ type: `
51
+ user-select: none;
52
+ direction: ltr !important;
53
+ font-family: Vazir;
54
+ font-size: 1mm;
55
+ font-weight: bold;
56
+ text-anchor: start;
57
+ dominant-baseline: middle;
58
+ `,
59
+ compliance: `
60
+ user-select: none;
61
+ direction: ltr !important;
62
+ font-family: Vazir;
63
+ font-size: 0.7mm;
64
+ text-anchor: end;
65
+ dominant-baseline: middle;
66
+ `,
67
+ mainFreqline: `stroke: black; stroke-width: 1;`,
68
+ semiOctavFreqline: `stroke: black; stroke-width: 1; stroke-dasharray: 4;`,
69
+ boldLine: 'stroke: black; stroke-width: 3;',
70
+
71
+ juncDashLine: `stroke-width: 1 ; stroke-opacity: 0.8; stroke-dasharray: 4;`,
72
+ juncLine: `stroke-width: 1; stroke-opacity: 0.8;`,
73
+ },
74
+ }
75
+
76
+ export default units;
@@ -1,17 +1,17 @@
1
1
  const svgNS = "http://www.w3.org/2000/svg";
2
2
 
3
- export default function putTextBox(
3
+ export default function putCell(
4
4
  {
5
- container, x, y, dx = 0, dy= 0 , w, h, rx,
5
+ container, x, y, dx = 0, dy= 0 , width, height, rx,
6
6
  style = "fill: transparent; stroke: black; stroke-width: 0.2;",
7
7
  }) {
8
8
  let rect = document.createElementNS(svgNS, "rect");
9
- rect.setAttribute("x", x - w / 2 + dx);
10
- rect.setAttribute("y", y - h / 2 + dy);
9
+ rect.setAttribute("x", x - width / 2 + dx);
10
+ rect.setAttribute("y", y - height / 2 + dy);
11
11
  rect.setAttribute("rx", rx);
12
12
 
13
- rect.setAttribute("width", w);
14
- rect.setAttribute("height", h);
13
+ rect.setAttribute("width", width);
14
+ rect.setAttribute("height", height);
15
15
  rect.setAttribute("style", style);
16
16
  container.appendChild(rect);
17
17
 
@@ -0,0 +1,10 @@
1
+ const svgNS = "http://www.w3.org/2000/svg";
2
+
3
+ export default function putG({ container, viewBox, className, style }) {
4
+ const svg = document.createElementNS(svgNS, "g");
5
+ viewBox && svg.setAttribute("viewBox", viewBox);
6
+ style && svg.setAttribute("style", style);
7
+ className && svg.setAttribute("class", className);
8
+ container && container.appendChild(svg);
9
+ return svg;
10
+ }
@@ -1,7 +1,7 @@
1
1
  // تابع رسم خط
2
2
  const svgNS = "http://www.w3.org/2000/svg";
3
3
 
4
- export default function putLine({ container, x1, y1, x2, y2, style = 'stroke: black; stroke-width: 0.5;', name }) {
4
+ export default function putLine({ container, x1, y1, x2, y2, style = 'stroke: black; stroke-width: 0.3;', name }) {
5
5
 
6
6
  let line = document.createElementNS(svgNS, "line");
7
7
  line.setAttribute("x1", x1);
@@ -3,16 +3,17 @@ const svgNS = "http://www.w3.org/2000/svg";
3
3
  // متن اس‌وی‌جی
4
4
  export default function putText(
5
5
  { container, value = '', x, y, id, dx = 0, dy = 0, style, name, className }) {
6
+
6
7
  let text = document.createElementNS(svgNS, "text");
7
8
  name && text.setAttribute("data-name", name)
8
9
  className && text.setAttribute("class", className);
9
10
  style && text.setAttribute("style", style);
10
- // text.setAttribute("dominant-baseline", "middle"); // تراز عمودی
11
- // text.setAttribute("fill", color);
12
11
  text.setAttribute("x", x + dx);
13
12
  text.setAttribute("y", y + dy);
14
- // آی دی برای تکست ها میذاریم و خط پایین میره داخل تابع آپدیت دیتای اسپیچ
15
- text.innerHTML = value;
13
+ text.textContent = value;
16
14
  container.appendChild(text);
17
15
  return text;
18
16
  }
17
+
18
+
19
+
package/src/main.js CHANGED
@@ -2,37 +2,209 @@
2
2
  import Audiogram from "./Audiogram/Audiogram.js"
3
3
  import Forms from "./Form/Forms.js";
4
4
  import { officeData, patientData } from "../assets/data/sampleData.js"
5
- import template_combo from "../assets/templates/template_combo.js";
5
+ import template from "../assets/templates/template_combo.js";
6
+ import Tympanogram from "./Tympanogram/Tympanogram.js";
7
+ import Speech from "./Speech/Speech.js";
8
+ import Reflex from "./Reflex/Reflex.js";
9
+ import MultiText from "./MultiText/MultiText.js";
10
+
6
11
 
7
12
 
8
13
  document.querySelector('#app').innerHTML = `
14
+ <div id="test"></div>
9
15
  <div id="audiogram-div"></div>
10
16
  <div id="forms-div"></div>
11
17
  `;
12
18
 
13
- const forms = new Forms({ container: document.getElementById('forms-div'), templates: [template_combo], mode: 'develop' });
19
+ const container = document.getElementById('test')
20
+
21
+ let dims = {
22
+ "name": "RSpeech",
23
+ "w": 100,
24
+ "h": 15,
25
+ "margin": {
26
+ "left": 2,
27
+ "top": 0,
28
+ "right": 12,
29
+ "bottom": 0
30
+ },
31
+ "display": "inline",
32
+ "stroke": true,
33
+ "width": 100 * 6,
34
+ "height": 20 * 6,
35
+ "labels": [
36
+ "SAT",
37
+ "SRT",
38
+ "MCL",
39
+ "UCL",
40
+ "SDS"
41
+ ]
42
+ }
43
+
44
+ // const RSpeech = new Speech({ container, side: 'R' , dims})
45
+ // RSpeech.update({ MCL: '55', SAT: '25', SDS: '98', UCL: '120', SRT: '30' })
46
+
47
+ dims = {
48
+ "name": "RTympanogram",
49
+ "w": 100,
50
+ "h": 60,
51
+ "margin": {
52
+ "left": 2,
53
+ "top": 0,
54
+ "right": 2,
55
+ "bottom": 0
56
+ },
57
+ "display": "inline",
58
+ "width": 100 * 6,
59
+ "height": 60 * 6
60
+ }
61
+
62
+ // const RTympanogram = new Tympanogram({ container, side: 'R', dims })
63
+
64
+ dims = {
65
+ "name": "RReflex",
66
+ "w": 100,
67
+ "h": 28,
68
+ "margin": {
69
+ "left": 2,
70
+ "top": 2,
71
+ "right": 2,
72
+ "bottom": 0
73
+ },
74
+ "display": "inline",
75
+ "width": 100 * 6,
76
+ "height": 30 * 6
77
+ }
78
+
79
+ // const RReflex = new Reflex({ container, side: 'R' , dims})
80
+
81
+ dims = {
82
+ "name": "patient",
83
+ "w": 200,
84
+ "h": 8,
85
+ "margin": {
86
+ "left": 1,
87
+ "top": 0,
88
+ "right": 1,
89
+ "bottom": 0
90
+ },
91
+ "display": "block",
92
+ "width": 198,
93
+ "height": 8,
94
+ "elements": [
95
+ {
96
+ "type": "text",
97
+ "x": 198,
98
+ "y": 5,
99
+ "value": "نام:"
100
+ },
101
+ {
102
+ "type": "text",
103
+ "x": 160,
104
+ "y": 5,
105
+ "value": "نام خانوادگی:"
106
+ },
107
+ {
108
+ "type": "text",
109
+ "x": 108,
110
+ "y": 5,
111
+ "value": "سن:"
112
+ },
113
+ {
114
+ "type": "text",
115
+ "x": 68,
116
+ "y": 5,
117
+ "value": "ارجاع از:"
118
+ }
119
+ ],
120
+ "inputs": [
121
+ {
122
+ "name": "name",
123
+ "x": 191,
124
+ "y": 5
125
+ },
126
+ {
127
+ "name": "lastName",
128
+ "x": 139,
129
+ "y": 5
130
+ },
131
+ {
132
+ "name": "age",
133
+ "x": 100,
134
+ "y": 5
135
+ },
136
+ {
137
+ "name": "referrer",
138
+ "x": 55,
139
+ "y": 5
140
+ }
141
+ ],
142
+ "forceInputs": [
143
+ {
144
+ "name": "name",
145
+ "x": 188,
146
+ "y": 4
147
+ },
148
+ {
149
+ "name": "lastName",
150
+ "x": 151,
151
+ "y": 5
152
+ },
153
+ {
154
+ "name": "age",
155
+ "x": 101,
156
+ "y": 5
157
+ },
158
+ {
159
+ "name": "referrer",
160
+ "x": 56,
161
+ "y": 5
162
+ }
163
+ ]
164
+ }
165
+
166
+ const patient = new MultiText({ container, dims })
167
+
168
+ dims = {
169
+ "blank": false,
170
+ "name": "RAudiogram",
171
+ "w": 100,
172
+ "h": 90,
173
+ "margin": {
174
+ "left": 1,
175
+ "top": 1,
176
+ "right": 1,
177
+ "bottom": 1
178
+ },
179
+ "display": "inline",
180
+ "borderBox": "display",
181
+ "width": 600,
182
+ "height": 600
183
+ }
184
+
185
+ // const RAudiogram = new Audiogram({ container, side: 'R', dims })
186
+ // RAudiogram.update({
187
+ // data: {
188
+ // // R_AC_M: { 8000: 25, 2000: 5, 1500: 0, },
189
+ // R_AC: { 1000: 25, 500: 15, 750: 20, 250: 10, 6000: 35, 2000: 45 },
190
+ // R_AC_NR: { 1500: 85 },
191
+ // R_BC_M: { 2000: 25, 6000: 25 },
192
+ // R_BC_M_NR: { 3000: 85 },
193
+ // R_BC: { 1000: 20, 500: 10, 750: 15, 250: 5, 4000: 20 },
194
+ // },
195
+ // side: 'R',
196
+ // })
197
+
198
+ const forms = new Forms({ container: document.getElementById('forms-div'), templates: [template], mode: 'develop' });
14
199
  forms.update({ officeData, patientData, sessionIndex: 0 })
15
200
 
201
+
202
+
203
+
16
204
  /*
17
- const RAudiogram = new Audiogram({
18
- container: document.getElementById('audiogram-div'), side: 'R',
19
- })
205
+ const LAudiogram = new Audiogram({ container: document.getElementById('audiogram-div'), side: 'L', })
20
206
 
21
- const LAudiogram = new Audiogram({
22
- container: document.getElementById('audiogram-div'), side: 'L',
23
- })
24
207
 
25
- RAudiogram.update({
26
- data: {
27
- // R_AC_M: { 8000: 25, 2000: 5, 1500: 0, },
28
- R_AC: { 1000: 25, 500: 15, 750: 20, 250: 10, 6000: 35, 2000: 45 },
29
- R_AC_NR: { 1500: 85 },
30
- R_BC_M: { 2000: 25, 6000: 25 },
31
- R_BC_M_NR: { 3000: 85 },
32
- R_BC: { 1000: 20, 500: 10, 750: 15, 250: 5, 4000: 20 },
33
- },
34
- side: 'R',
35
- })
36
208
 
37
209
  LAudiogram.update({
38
210
  data: {
@@ -48,3 +220,4 @@ LAudiogram.update({
48
220
 
49
221
 
50
222
 
223
+