shareneus 1.3.3 → 1.3.4

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.
@@ -27,16 +27,21 @@ class ConsultationPDFService {
27
27
  this.GetBP(CnstData), this.GetTemperature(CnstData),
28
28
  this.GetSPO2(CnstData), this.GetPulse(CnstData)], fontSize: 8, marginTop: 5
29
29
  },
30
- { text: 'Complaints:', bold: true, marginTop: 5, fontSize: 12 },
31
- { text: this.GetComplaints(CnstData.Comps), fontSize: 9, marginTop: 5, marginBottom: 10 },
32
- { text: 'Diagnosis:', bold: true, marginTop: 5, fontSize: 12 },
33
- { text: this.GetDiagnosis(CnstData.Diags), fontSize: 9, marginTop: 5, marginBottom: 10 },
34
- { text: 'Rx:', bold: true, fontSize: 12 },
35
- this.GetItemsTable(CnstData.Rx, Remarks),
36
- { text: 'Lab Investigations:', bold: true, marginTop: 5, fontSize: 12 },
37
- { text: this.GetComplaints(CnstData.Tests), fontSize: 9, marginTop: 5, marginBottom: 10 },
38
- { text: 'Advices:', bold: true, marginTop: 5, fontSize: 12 },
39
- { text: this.GetDiagnosis(CnstData.Advice), fontSize: 9, marginTop: 5, marginBottom: 10 },
30
+ this.GetComplaintsTable(CnstData.Comps, 'Complaints:'),
31
+ this.GetDiagnosisTable(CnstData.Diags, 'Diagnosis:'),
32
+ this.GetRxTable(CnstData.Rx, Remarks),
33
+ this.GetComplaintsTable(CnstData.Tests, 'Lab Investigations:'),
34
+ this.GetDiagnosisTable(CnstData.Advice, 'Advices:'),
35
+ // { text: 'Complaints:', bold: true, marginTop: 5, fontSize: 12 },
36
+ // { text: this.GetComplaints(CnstData.Comps), fontSize: 9, marginTop: 5, marginBottom: 10 },
37
+ // { text: 'Diagnosis:', bold: true, marginTop: 5, fontSize: 12 },
38
+ // { text: this.GetDiagnosis(CnstData.Diags), fontSize: 9, marginTop: 5, marginBottom: 10 },
39
+ // { text: 'Rx:', bold: true, fontSize: 12 },
40
+ // this.GetItemsTable(CnstData.Rx, Remarks),
41
+ // { text: 'Lab Investigations:', bold: true, marginTop: 5, fontSize: 12 },
42
+ // { text: this.GetComplaints(CnstData.Tests), fontSize: 9, marginTop: 5, marginBottom: 10 },
43
+ // { text: 'Advices:', bold: true, marginTop: 5, fontSize: 12 },
44
+ // { text: this.GetDiagnosis(CnstData.Advice), fontSize: 9, marginTop: 5, marginBottom: 10 },
40
45
  this.CustomSection(CnstData.Sections)
41
46
  // this.GetSignatures(CnstData.Entity.CName, CnstData.Type, CnstData.For),
42
47
  ],
@@ -81,6 +86,45 @@ class ConsultationPDFService {
81
86
  };
82
87
  return dd;
83
88
  }
89
+ static GetRxTable(Rx, Remarks) {
90
+ if (!tr_utils_1.TrUtils.IsNull(Rx) && Rx.length !== 0) {
91
+ return {
92
+ stack: [
93
+ { text: 'Rx:', bold: true, fontSize: 12 },
94
+ this.GetItemsTable(Rx, Remarks),
95
+ ]
96
+ };
97
+ }
98
+ else {
99
+ return {};
100
+ }
101
+ }
102
+ static GetDiagnosisTable(diagnosis, heading) {
103
+ if (!tr_utils_1.TrUtils.IsNull(diagnosis) && diagnosis.length !== 0) {
104
+ return {
105
+ stack: [
106
+ { text: heading, bold: true, marginTop: 5, fontSize: 12 },
107
+ { text: this.GetDiagnosis(diagnosis), fontSize: 9, marginTop: 5, marginBottom: 10 },
108
+ ]
109
+ };
110
+ }
111
+ else {
112
+ return {};
113
+ }
114
+ }
115
+ static GetComplaintsTable(complaints, heading) {
116
+ if (!tr_utils_1.TrUtils.IsNull(complaints) && complaints.length !== 0) {
117
+ return {
118
+ stack: [
119
+ { text: heading, bold: true, marginTop: 5, fontSize: 12 },
120
+ { text: this.GetComplaints(complaints), fontSize: 9, marginTop: 5, marginBottom: 10 },
121
+ ]
122
+ };
123
+ }
124
+ else {
125
+ return {};
126
+ }
127
+ }
84
128
  static CustomSection(sections) {
85
129
  let Sec = [];
86
130
  sections === null || sections === void 0 ? void 0 : sections.forEach((sec) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",