openchs-models 1.26.0 → 1.26.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.
|
@@ -106,6 +106,45 @@ class FormMapping {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
getEntityNameAndEntityTypeUUID() {
|
|
110
|
+
const formTypes = _Form.default.formTypes;
|
|
111
|
+
|
|
112
|
+
switch (this.form.formType) {
|
|
113
|
+
case formTypes.IndividualProfile:
|
|
114
|
+
return {
|
|
115
|
+
entityName: _Individual.default.schema.name,
|
|
116
|
+
entityTypeUuid: this.subjectType.uuid
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
case formTypes.Encounter:
|
|
120
|
+
case formTypes.IndividualEncounterCancellation:
|
|
121
|
+
return {
|
|
122
|
+
entityName: _Encounter.default.schema.name,
|
|
123
|
+
entityTypeUuid: this.observationsTypeEntityUUID
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
case formTypes.ProgramEncounter:
|
|
127
|
+
case formTypes.ProgramEncounterCancellation:
|
|
128
|
+
return {
|
|
129
|
+
entityName: _ProgramEncounter.default.schema.name,
|
|
130
|
+
entityTypeUuid: this.observationsTypeEntityUUID
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
case formTypes.ProgramEnrolment:
|
|
134
|
+
case formTypes.ProgramExit:
|
|
135
|
+
return {
|
|
136
|
+
entityName: _ProgramEnrolment.default.schema.name,
|
|
137
|
+
entityTypeUuid: this.entityUUID
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
default:
|
|
141
|
+
return {
|
|
142
|
+
entityName: "",
|
|
143
|
+
entityTypeUuid: ""
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
109
148
|
}
|
|
110
149
|
|
|
111
150
|
_defineProperty(FormMapping, "schema", {
|