@blackcode_sa/metaestetics-api 1.12.54 → 1.12.56
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/dist/admin/index.js +15 -3
- package/dist/admin/index.mjs +15 -3
- package/dist/index.js +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +1 -1
- package/src/admin/booking/booking.admin.ts +15 -15
- package/src/admin/free-consultation/free-consultation-utils.admin.ts +15 -3
- package/src/services/appointment/utils/extended-procedure.utils.ts +19 -19
- package/src/services/appointment/utils/recommended-procedure.utils.ts +5 -5
- package/src/services/procedure/procedure.service.ts +12 -4
package/dist/admin/index.js
CHANGED
|
@@ -7932,9 +7932,21 @@ async function createFreeConsultationInfrastructure(db) {
|
|
|
7932
7932
|
contraindications: [],
|
|
7933
7933
|
// No contraindications for consultation
|
|
7934
7934
|
benefits: [
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7935
|
+
{
|
|
7936
|
+
id: "IMPROVED_PATIENT_UNDERSTANDING",
|
|
7937
|
+
name: "Improved Patient Understanding",
|
|
7938
|
+
description: "Helps patients better understand their treatment options and expected outcomes"
|
|
7939
|
+
},
|
|
7940
|
+
{
|
|
7941
|
+
id: "BETTER_TREATMENT_PLANNING",
|
|
7942
|
+
name: "Better Treatment Planning",
|
|
7943
|
+
description: "Enables more effective treatment planning based on patient needs and goals"
|
|
7944
|
+
},
|
|
7945
|
+
{
|
|
7946
|
+
id: "ENHANCED_PATIENT_CONFIDENCE",
|
|
7947
|
+
name: "Enhanced Patient Confidence",
|
|
7948
|
+
description: "Builds patient confidence through clear communication and professional guidance"
|
|
7949
|
+
}
|
|
7938
7950
|
],
|
|
7939
7951
|
certificationRequirement: {
|
|
7940
7952
|
minimumLevel: "aesthetician" /* AESTHETICIAN */,
|
package/dist/admin/index.mjs
CHANGED
|
@@ -7870,9 +7870,21 @@ async function createFreeConsultationInfrastructure(db) {
|
|
|
7870
7870
|
contraindications: [],
|
|
7871
7871
|
// No contraindications for consultation
|
|
7872
7872
|
benefits: [
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7873
|
+
{
|
|
7874
|
+
id: "IMPROVED_PATIENT_UNDERSTANDING",
|
|
7875
|
+
name: "Improved Patient Understanding",
|
|
7876
|
+
description: "Helps patients better understand their treatment options and expected outcomes"
|
|
7877
|
+
},
|
|
7878
|
+
{
|
|
7879
|
+
id: "BETTER_TREATMENT_PLANNING",
|
|
7880
|
+
name: "Better Treatment Planning",
|
|
7881
|
+
description: "Enables more effective treatment planning based on patient needs and goals"
|
|
7882
|
+
},
|
|
7883
|
+
{
|
|
7884
|
+
id: "ENHANCED_PATIENT_CONFIDENCE",
|
|
7885
|
+
name: "Enhanced Patient Confidence",
|
|
7886
|
+
description: "Builds patient confidence through clear communication and professional guidance"
|
|
7887
|
+
}
|
|
7876
7888
|
],
|
|
7877
7889
|
certificationRequirement: {
|
|
7878
7890
|
minimumLevel: "aesthetician" /* AESTHETICIAN */,
|
package/dist/index.js
CHANGED
|
@@ -16492,7 +16492,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16492
16492
|
* @returns The created procedure
|
|
16493
16493
|
*/
|
|
16494
16494
|
async createProcedure(data) {
|
|
16495
|
-
var _a, _b
|
|
16495
|
+
var _a, _b;
|
|
16496
16496
|
const validatedData = createProcedureSchema.parse(data);
|
|
16497
16497
|
const isProductFree = !validatedData.productId;
|
|
16498
16498
|
const procedureId = this.generateId();
|
|
@@ -16577,7 +16577,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16577
16577
|
contraindications: technology.contraindications || [],
|
|
16578
16578
|
contraindicationIds: ((_b = technology.contraindications) == null ? void 0 : _b.map((c) => c.id)) || [],
|
|
16579
16579
|
treatmentBenefits: technology.benefits,
|
|
16580
|
-
treatmentBenefitIds: (
|
|
16580
|
+
treatmentBenefitIds: Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [],
|
|
16581
16581
|
preRequirements: technology.requirements.pre,
|
|
16582
16582
|
postRequirements: technology.requirements.post,
|
|
16583
16583
|
certificationRequirement: technology.certificationRequirement,
|
|
@@ -16631,7 +16631,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16631
16631
|
* @returns A promise that resolves to an array of the newly created procedures.
|
|
16632
16632
|
*/
|
|
16633
16633
|
async bulkCreateProcedures(baseData, practitionerIds) {
|
|
16634
|
-
var _a, _b
|
|
16634
|
+
var _a, _b;
|
|
16635
16635
|
if (!practitionerIds || practitionerIds.length === 0) {
|
|
16636
16636
|
throw new Error("Practitioner IDs array cannot be empty.");
|
|
16637
16637
|
}
|
|
@@ -16739,7 +16739,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16739
16739
|
contraindications: technology.contraindications || [],
|
|
16740
16740
|
contraindicationIds: ((_b = technology.contraindications) == null ? void 0 : _b.map((c) => c.id)) || [],
|
|
16741
16741
|
treatmentBenefits: technology.benefits,
|
|
16742
|
-
treatmentBenefitIds: (
|
|
16742
|
+
treatmentBenefitIds: Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [],
|
|
16743
16743
|
preRequirements: technology.requirements.pre,
|
|
16744
16744
|
postRequirements: technology.requirements.post,
|
|
16745
16745
|
certificationRequirement: technology.certificationRequirement,
|
|
@@ -16852,7 +16852,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16852
16852
|
* @returns The updated procedure
|
|
16853
16853
|
*/
|
|
16854
16854
|
async updateProcedure(id, data) {
|
|
16855
|
-
var _a, _b, _c
|
|
16855
|
+
var _a, _b, _c;
|
|
16856
16856
|
const validatedData = updateProcedureSchema.parse(data);
|
|
16857
16857
|
const procedureRef = (0, import_firestore55.doc)(this.db, PROCEDURES_COLLECTION, id);
|
|
16858
16858
|
const procedureSnapshot = await (0, import_firestore55.getDoc)(procedureRef);
|
|
@@ -16966,7 +16966,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16966
16966
|
updatedProcedureData.contraindications = technology.contraindications || [];
|
|
16967
16967
|
updatedProcedureData.contraindicationIds = ((_c = technology.contraindications) == null ? void 0 : _c.map((c) => c.id)) || [];
|
|
16968
16968
|
updatedProcedureData.treatmentBenefits = technology.benefits;
|
|
16969
|
-
updatedProcedureData.treatmentBenefitIds = (
|
|
16969
|
+
updatedProcedureData.treatmentBenefitIds = Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [];
|
|
16970
16970
|
updatedProcedureData.preRequirements = technology.requirements.pre;
|
|
16971
16971
|
updatedProcedureData.postRequirements = technology.requirements.post;
|
|
16972
16972
|
updatedProcedureData.certificationRequirement = technology.certificationRequirement;
|
|
@@ -17486,7 +17486,7 @@ var ProcedureService = class extends BaseService {
|
|
|
17486
17486
|
* @returns The created procedure
|
|
17487
17487
|
*/
|
|
17488
17488
|
async createConsultationProcedure(data) {
|
|
17489
|
-
var _a, _b
|
|
17489
|
+
var _a, _b;
|
|
17490
17490
|
const procedureId = this.generateId();
|
|
17491
17491
|
const [category, subcategory, technology] = await Promise.all([
|
|
17492
17492
|
this.categoryService.getById(data.categoryId),
|
|
@@ -17548,7 +17548,7 @@ var ProcedureService = class extends BaseService {
|
|
|
17548
17548
|
contraindications: technology.contraindications || [],
|
|
17549
17549
|
contraindicationIds: ((_b = technology.contraindications) == null ? void 0 : _b.map((c) => c.id)) || [],
|
|
17550
17550
|
treatmentBenefits: technology.benefits,
|
|
17551
|
-
treatmentBenefitIds: (
|
|
17551
|
+
treatmentBenefitIds: Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [],
|
|
17552
17552
|
preRequirements: technology.requirements.pre,
|
|
17553
17553
|
postRequirements: technology.requirements.post,
|
|
17554
17554
|
certificationRequirement: technology.certificationRequirement,
|
package/dist/index.mjs
CHANGED
|
@@ -16740,7 +16740,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16740
16740
|
* @returns The created procedure
|
|
16741
16741
|
*/
|
|
16742
16742
|
async createProcedure(data) {
|
|
16743
|
-
var _a, _b
|
|
16743
|
+
var _a, _b;
|
|
16744
16744
|
const validatedData = createProcedureSchema.parse(data);
|
|
16745
16745
|
const isProductFree = !validatedData.productId;
|
|
16746
16746
|
const procedureId = this.generateId();
|
|
@@ -16825,7 +16825,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16825
16825
|
contraindications: technology.contraindications || [],
|
|
16826
16826
|
contraindicationIds: ((_b = technology.contraindications) == null ? void 0 : _b.map((c) => c.id)) || [],
|
|
16827
16827
|
treatmentBenefits: technology.benefits,
|
|
16828
|
-
treatmentBenefitIds: (
|
|
16828
|
+
treatmentBenefitIds: Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [],
|
|
16829
16829
|
preRequirements: technology.requirements.pre,
|
|
16830
16830
|
postRequirements: technology.requirements.post,
|
|
16831
16831
|
certificationRequirement: technology.certificationRequirement,
|
|
@@ -16879,7 +16879,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16879
16879
|
* @returns A promise that resolves to an array of the newly created procedures.
|
|
16880
16880
|
*/
|
|
16881
16881
|
async bulkCreateProcedures(baseData, practitionerIds) {
|
|
16882
|
-
var _a, _b
|
|
16882
|
+
var _a, _b;
|
|
16883
16883
|
if (!practitionerIds || practitionerIds.length === 0) {
|
|
16884
16884
|
throw new Error("Practitioner IDs array cannot be empty.");
|
|
16885
16885
|
}
|
|
@@ -16987,7 +16987,7 @@ var ProcedureService = class extends BaseService {
|
|
|
16987
16987
|
contraindications: technology.contraindications || [],
|
|
16988
16988
|
contraindicationIds: ((_b = technology.contraindications) == null ? void 0 : _b.map((c) => c.id)) || [],
|
|
16989
16989
|
treatmentBenefits: technology.benefits,
|
|
16990
|
-
treatmentBenefitIds: (
|
|
16990
|
+
treatmentBenefitIds: Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [],
|
|
16991
16991
|
preRequirements: technology.requirements.pre,
|
|
16992
16992
|
postRequirements: technology.requirements.post,
|
|
16993
16993
|
certificationRequirement: technology.certificationRequirement,
|
|
@@ -17100,7 +17100,7 @@ var ProcedureService = class extends BaseService {
|
|
|
17100
17100
|
* @returns The updated procedure
|
|
17101
17101
|
*/
|
|
17102
17102
|
async updateProcedure(id, data) {
|
|
17103
|
-
var _a, _b, _c
|
|
17103
|
+
var _a, _b, _c;
|
|
17104
17104
|
const validatedData = updateProcedureSchema.parse(data);
|
|
17105
17105
|
const procedureRef = doc36(this.db, PROCEDURES_COLLECTION, id);
|
|
17106
17106
|
const procedureSnapshot = await getDoc37(procedureRef);
|
|
@@ -17214,7 +17214,7 @@ var ProcedureService = class extends BaseService {
|
|
|
17214
17214
|
updatedProcedureData.contraindications = technology.contraindications || [];
|
|
17215
17215
|
updatedProcedureData.contraindicationIds = ((_c = technology.contraindications) == null ? void 0 : _c.map((c) => c.id)) || [];
|
|
17216
17216
|
updatedProcedureData.treatmentBenefits = technology.benefits;
|
|
17217
|
-
updatedProcedureData.treatmentBenefitIds = (
|
|
17217
|
+
updatedProcedureData.treatmentBenefitIds = Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [];
|
|
17218
17218
|
updatedProcedureData.preRequirements = technology.requirements.pre;
|
|
17219
17219
|
updatedProcedureData.postRequirements = technology.requirements.post;
|
|
17220
17220
|
updatedProcedureData.certificationRequirement = technology.certificationRequirement;
|
|
@@ -17734,7 +17734,7 @@ var ProcedureService = class extends BaseService {
|
|
|
17734
17734
|
* @returns The created procedure
|
|
17735
17735
|
*/
|
|
17736
17736
|
async createConsultationProcedure(data) {
|
|
17737
|
-
var _a, _b
|
|
17737
|
+
var _a, _b;
|
|
17738
17738
|
const procedureId = this.generateId();
|
|
17739
17739
|
const [category, subcategory, technology] = await Promise.all([
|
|
17740
17740
|
this.categoryService.getById(data.categoryId),
|
|
@@ -17796,7 +17796,7 @@ var ProcedureService = class extends BaseService {
|
|
|
17796
17796
|
contraindications: technology.contraindications || [],
|
|
17797
17797
|
contraindicationIds: ((_b = technology.contraindications) == null ? void 0 : _b.map((c) => c.id)) || [],
|
|
17798
17798
|
treatmentBenefits: technology.benefits,
|
|
17799
|
-
treatmentBenefitIds: (
|
|
17799
|
+
treatmentBenefitIds: Array.isArray(technology.benefits) ? technology.benefits.map((b) => typeof b === "string" ? b : b.id) : [],
|
|
17800
17800
|
preRequirements: technology.requirements.pre,
|
|
17801
17801
|
postRequirements: technology.requirements.post,
|
|
17802
17802
|
certificationRequirement: technology.certificationRequirement,
|
package/package.json
CHANGED
|
@@ -1007,11 +1007,11 @@ export class BookingAdmin {
|
|
|
1007
1007
|
procedureProducts: productsMetadata
|
|
1008
1008
|
.filter((pp: any) => pp && pp.product) // Safety check for product-free procedures
|
|
1009
1009
|
.map((pp: any) => ({
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1010
|
+
productId: pp.product.id,
|
|
1011
|
+
productName: pp.product.name,
|
|
1012
|
+
brandId: pp.product.brandId,
|
|
1013
|
+
brandName: pp.product.brandName,
|
|
1014
|
+
})),
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
@@ -1021,16 +1021,16 @@ export class BookingAdmin {
|
|
|
1021
1021
|
return productsMetadata
|
|
1022
1022
|
.filter((pp: any) => pp && pp.product) // Safety check for product-free procedures
|
|
1023
1023
|
.map((pp: any) => {
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1024
|
+
const product = pp.product;
|
|
1025
|
+
return {
|
|
1026
|
+
productId: product.id,
|
|
1027
|
+
productName: product.name,
|
|
1028
|
+
brandId: product.brandId,
|
|
1029
|
+
brandName: product.brandName,
|
|
1030
|
+
procedureId: procedure.id,
|
|
1031
|
+
price: pp.price,
|
|
1032
|
+
currency: pp.currency,
|
|
1033
|
+
unitOfMeasurement: pp.pricingMeasure,
|
|
1034
1034
|
};
|
|
1035
1035
|
});
|
|
1036
1036
|
}
|
|
@@ -110,9 +110,21 @@ async function createFreeConsultationInfrastructure(db: admin.firestore.Firestor
|
|
|
110
110
|
blockingConditions: [], // No blocking conditions for consultation
|
|
111
111
|
contraindications: [], // No contraindications for consultation
|
|
112
112
|
benefits: [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
{
|
|
114
|
+
id: 'IMPROVED_PATIENT_UNDERSTANDING',
|
|
115
|
+
name: 'Improved Patient Understanding',
|
|
116
|
+
description: 'Helps patients better understand their treatment options and expected outcomes',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 'BETTER_TREATMENT_PLANNING',
|
|
120
|
+
name: 'Better Treatment Planning',
|
|
121
|
+
description: 'Enables more effective treatment planning based on patient needs and goals',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: 'ENHANCED_PATIENT_CONFIDENCE',
|
|
125
|
+
name: 'Enhanced Patient Confidence',
|
|
126
|
+
description: 'Builds patient confidence through clear communication and professional guidance',
|
|
127
|
+
},
|
|
116
128
|
],
|
|
117
129
|
certificationRequirement: {
|
|
118
130
|
minimumLevel: CertificationLevel.AESTHETICIAN,
|
|
@@ -41,20 +41,20 @@ async function aggregateProductsFromProcedure(
|
|
|
41
41
|
const newProducts: AppointmentProductMetadata[] = productsMetadata
|
|
42
42
|
.filter((pp: any) => pp && pp.product)
|
|
43
43
|
.map((pp: any) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
// Each item in productsMetadata is a ProcedureProduct with embedded Product
|
|
45
|
+
const product = pp.product;
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
productId: product.id,
|
|
49
|
+
productName: product.name,
|
|
50
|
+
brandId: product.brandId,
|
|
51
|
+
brandName: product.brandName,
|
|
52
|
+
procedureId: procedureId,
|
|
53
|
+
price: pp.price, // Price from ProcedureProduct
|
|
54
|
+
currency: pp.currency, // Currency from ProcedureProduct
|
|
55
|
+
unitOfMeasurement: pp.pricingMeasure, // PricingMeasure from ProcedureProduct
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
58
|
|
|
59
59
|
// Merge with existing products, avoiding duplicates
|
|
60
60
|
const productMap = new Map<string, AppointmentProductMetadata>();
|
|
@@ -108,11 +108,11 @@ async function createExtendedProcedureInfo(
|
|
|
108
108
|
procedureProducts: (data.productsMetadata || [])
|
|
109
109
|
.filter((pp: any) => pp && pp.product) // Safety check for product-free procedures
|
|
110
110
|
.map((pp: any) => ({
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
productId: pp.product.id, // Access embedded product
|
|
112
|
+
productName: pp.product.name, // Access embedded product
|
|
113
|
+
brandId: pp.product.brandId, // Access embedded product
|
|
114
|
+
brandName: pp.product.brandName, // Access embedded product
|
|
115
|
+
})),
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -41,11 +41,11 @@ async function createExtendedProcedureInfoForRecommended(
|
|
|
41
41
|
procedureProducts: (data.productsMetadata || [])
|
|
42
42
|
.filter((pp: any) => pp && pp.product) // Safety check for product-free procedures
|
|
43
43
|
.map((pp: any) => ({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
productId: pp.product.id,
|
|
45
|
+
productName: pp.product.name,
|
|
46
|
+
brandId: pp.product.brandId,
|
|
47
|
+
brandName: pp.product.brandName,
|
|
48
|
+
})),
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -307,7 +307,9 @@ export class ProcedureService extends BaseService {
|
|
|
307
307
|
contraindications: technology.contraindications || [],
|
|
308
308
|
contraindicationIds: technology.contraindications?.map(c => c.id) || [],
|
|
309
309
|
treatmentBenefits: technology.benefits,
|
|
310
|
-
treatmentBenefitIds: technology.benefits
|
|
310
|
+
treatmentBenefitIds: Array.isArray(technology.benefits)
|
|
311
|
+
? technology.benefits.map(b => typeof b === 'string' ? b : b.id)
|
|
312
|
+
: [],
|
|
311
313
|
preRequirements: technology.requirements.pre,
|
|
312
314
|
postRequirements: technology.requirements.post,
|
|
313
315
|
certificationRequirement: technology.certificationRequirement,
|
|
@@ -516,7 +518,9 @@ export class ProcedureService extends BaseService {
|
|
|
516
518
|
contraindications: technology.contraindications || [],
|
|
517
519
|
contraindicationIds: technology.contraindications?.map(c => c.id) || [],
|
|
518
520
|
treatmentBenefits: technology.benefits,
|
|
519
|
-
treatmentBenefitIds: technology.benefits
|
|
521
|
+
treatmentBenefitIds: Array.isArray(technology.benefits)
|
|
522
|
+
? technology.benefits.map(b => typeof b === 'string' ? b : b.id)
|
|
523
|
+
: [],
|
|
520
524
|
preRequirements: technology.requirements.pre,
|
|
521
525
|
postRequirements: technology.requirements.post,
|
|
522
526
|
certificationRequirement: technology.certificationRequirement,
|
|
@@ -789,7 +793,9 @@ export class ProcedureService extends BaseService {
|
|
|
789
793
|
updatedProcedureData.contraindications = technology.contraindications || [];
|
|
790
794
|
updatedProcedureData.contraindicationIds = technology.contraindications?.map(c => c.id) || [];
|
|
791
795
|
updatedProcedureData.treatmentBenefits = technology.benefits;
|
|
792
|
-
updatedProcedureData.treatmentBenefitIds = technology.benefits
|
|
796
|
+
updatedProcedureData.treatmentBenefitIds = Array.isArray(technology.benefits)
|
|
797
|
+
? technology.benefits.map(b => typeof b === 'string' ? b : b.id)
|
|
798
|
+
: [];
|
|
793
799
|
updatedProcedureData.preRequirements = technology.requirements.pre;
|
|
794
800
|
updatedProcedureData.postRequirements = technology.requirements.post;
|
|
795
801
|
updatedProcedureData.certificationRequirement = technology.certificationRequirement;
|
|
@@ -1552,7 +1558,9 @@ export class ProcedureService extends BaseService {
|
|
|
1552
1558
|
contraindications: technology.contraindications || [],
|
|
1553
1559
|
contraindicationIds: technology.contraindications?.map(c => c.id) || [],
|
|
1554
1560
|
treatmentBenefits: technology.benefits,
|
|
1555
|
-
treatmentBenefitIds: technology.benefits
|
|
1561
|
+
treatmentBenefitIds: Array.isArray(technology.benefits)
|
|
1562
|
+
? technology.benefits.map(b => typeof b === 'string' ? b : b.id)
|
|
1563
|
+
: [],
|
|
1556
1564
|
preRequirements: technology.requirements.pre,
|
|
1557
1565
|
postRequirements: technology.requirements.post,
|
|
1558
1566
|
certificationRequirement: technology.certificationRequirement,
|