@claudebernard/patient-profile-element 0.6.4 → 0.6.5
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/custom-elements.json +343 -303
- package/dist/patient-profile.es.js +27 -6
- package/package.json +2 -2
|
@@ -346,284 +346,6 @@
|
|
|
346
346
|
}
|
|
347
347
|
]
|
|
348
348
|
},
|
|
349
|
-
{
|
|
350
|
-
"kind": "javascript-module",
|
|
351
|
-
"path": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts",
|
|
352
|
-
"declarations": [
|
|
353
|
-
{
|
|
354
|
-
"kind": "variable",
|
|
355
|
-
"name": "Base",
|
|
356
|
-
"type": {
|
|
357
|
-
"text": "WebComponentsStory<any, any>"
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"kind": "variable",
|
|
362
|
-
"name": "AgeAndSexeEditable",
|
|
363
|
-
"type": {
|
|
364
|
-
"text": "WebComponentsStory<any, any>"
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
],
|
|
368
|
-
"exports": [
|
|
369
|
-
{
|
|
370
|
-
"kind": "js",
|
|
371
|
-
"name": "Base",
|
|
372
|
-
"declaration": {
|
|
373
|
-
"name": "Base",
|
|
374
|
-
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
"kind": "js",
|
|
379
|
-
"name": "AgeAndSexeEditable",
|
|
380
|
-
"declaration": {
|
|
381
|
-
"name": "AgeAndSexeEditable",
|
|
382
|
-
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
]
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
"kind": "javascript-module",
|
|
389
|
-
"path": "src/patient-profile/patient-profile-edition/patient-profile-edition.ts",
|
|
390
|
-
"declarations": [
|
|
391
|
-
{
|
|
392
|
-
"kind": "class",
|
|
393
|
-
"description": "Orchestrateur de la modale d'édition du profil patient : assemble les sous-formulaires\npar domaine clinique (démographie, grossesse/allaitement, pathologies, allergies, rénal,\nhépatique), collecte leurs valeurs à la validation pour les écrire dans le Bundle FHIR,\net gère l'ouverture/fermeture/réinitialisation de la modale.",
|
|
394
|
-
"name": "PatientProfileEdition",
|
|
395
|
-
"members": [
|
|
396
|
-
{
|
|
397
|
-
"kind": "field",
|
|
398
|
-
"name": "patientProfile",
|
|
399
|
-
"type": {
|
|
400
|
-
"text": "Bundle | undefined"
|
|
401
|
-
},
|
|
402
|
-
"attribute": "patient-profile"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"kind": "field",
|
|
406
|
-
"name": "apiUrl",
|
|
407
|
-
"type": {
|
|
408
|
-
"text": "string"
|
|
409
|
-
},
|
|
410
|
-
"default": "\"https://api-dev.claudebernard.fr\"",
|
|
411
|
-
"attribute": "api-url"
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"kind": "field",
|
|
415
|
-
"name": "apiKey",
|
|
416
|
-
"type": {
|
|
417
|
-
"text": "string | undefined"
|
|
418
|
-
},
|
|
419
|
-
"attribute": "api-key"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
"kind": "field",
|
|
423
|
-
"name": "preferences",
|
|
424
|
-
"type": {
|
|
425
|
-
"text": "PatientProfilePreferences | undefined"
|
|
426
|
-
},
|
|
427
|
-
"attribute": "preferences"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"kind": "field",
|
|
431
|
-
"name": "isPregnancyDivVisible",
|
|
432
|
-
"type": {
|
|
433
|
-
"text": "boolean"
|
|
434
|
-
},
|
|
435
|
-
"privacy": "private",
|
|
436
|
-
"default": "false"
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
"kind": "field",
|
|
440
|
-
"name": "demographicsHasError",
|
|
441
|
-
"type": {
|
|
442
|
-
"text": "boolean"
|
|
443
|
-
},
|
|
444
|
-
"privacy": "private",
|
|
445
|
-
"default": "false"
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
"kind": "field",
|
|
449
|
-
"name": "resetKey",
|
|
450
|
-
"type": {
|
|
451
|
-
"text": "number"
|
|
452
|
-
},
|
|
453
|
-
"privacy": "private",
|
|
454
|
-
"default": "0"
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
"kind": "field",
|
|
458
|
-
"name": "editionModalElement",
|
|
459
|
-
"type": {
|
|
460
|
-
"text": "HTMLElement & { open: () => void; close: () => void }"
|
|
461
|
-
},
|
|
462
|
-
"privacy": "private"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
"kind": "field",
|
|
466
|
-
"name": "demographicsForm",
|
|
467
|
-
"type": {
|
|
468
|
-
"text": "PatientDemographicsForm"
|
|
469
|
-
},
|
|
470
|
-
"privacy": "private"
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
"kind": "field",
|
|
474
|
-
"name": "reproductiveForm",
|
|
475
|
-
"type": {
|
|
476
|
-
"text": "PatientReproductiveForm"
|
|
477
|
-
},
|
|
478
|
-
"privacy": "private"
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
"kind": "field",
|
|
482
|
-
"name": "pathologiesForm",
|
|
483
|
-
"type": {
|
|
484
|
-
"text": "PatientPathologiesForm"
|
|
485
|
-
},
|
|
486
|
-
"privacy": "private"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"kind": "field",
|
|
490
|
-
"name": "allergiesForm",
|
|
491
|
-
"type": {
|
|
492
|
-
"text": "PatientAllergiesForm"
|
|
493
|
-
},
|
|
494
|
-
"privacy": "private"
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
"kind": "field",
|
|
498
|
-
"name": "renalForm",
|
|
499
|
-
"type": {
|
|
500
|
-
"text": "PatientRenalForm"
|
|
501
|
-
},
|
|
502
|
-
"privacy": "private"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"kind": "field",
|
|
506
|
-
"name": "hepaticForm",
|
|
507
|
-
"type": {
|
|
508
|
-
"text": "PatientHepaticForm"
|
|
509
|
-
},
|
|
510
|
-
"privacy": "private"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
"kind": "method",
|
|
514
|
-
"name": "open",
|
|
515
|
-
"privacy": "public",
|
|
516
|
-
"return": {
|
|
517
|
-
"type": {
|
|
518
|
-
"text": "void"
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
"kind": "method",
|
|
524
|
-
"name": "handleCancel",
|
|
525
|
-
"privacy": "private",
|
|
526
|
-
"return": {
|
|
527
|
-
"type": {
|
|
528
|
-
"text": "void"
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"kind": "method",
|
|
534
|
-
"name": "handleDemographicsChange",
|
|
535
|
-
"privacy": "private",
|
|
536
|
-
"return": {
|
|
537
|
-
"type": {
|
|
538
|
-
"text": "void"
|
|
539
|
-
}
|
|
540
|
-
},
|
|
541
|
-
"parameters": [
|
|
542
|
-
{
|
|
543
|
-
"name": "event",
|
|
544
|
-
"type": {
|
|
545
|
-
"text": "CustomEvent<DemographicsChangeEventDetail>"
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
]
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
"kind": "method",
|
|
552
|
-
"name": "validateForm",
|
|
553
|
-
"privacy": "private",
|
|
554
|
-
"return": {
|
|
555
|
-
"type": {
|
|
556
|
-
"text": "void"
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
],
|
|
561
|
-
"events": [
|
|
562
|
-
{
|
|
563
|
-
"name": "editPatientProfile",
|
|
564
|
-
"type": {
|
|
565
|
-
"text": "CustomEvent"
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
],
|
|
569
|
-
"attributes": [
|
|
570
|
-
{
|
|
571
|
-
"name": "patient-profile",
|
|
572
|
-
"type": {
|
|
573
|
-
"text": "Bundle | undefined"
|
|
574
|
-
},
|
|
575
|
-
"fieldName": "patientProfile"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
"name": "api-url",
|
|
579
|
-
"type": {
|
|
580
|
-
"text": "string"
|
|
581
|
-
},
|
|
582
|
-
"default": "\"https://api-dev.claudebernard.fr\"",
|
|
583
|
-
"fieldName": "apiUrl"
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
"name": "api-key",
|
|
587
|
-
"type": {
|
|
588
|
-
"text": "string | undefined"
|
|
589
|
-
},
|
|
590
|
-
"fieldName": "apiKey"
|
|
591
|
-
},
|
|
592
|
-
{
|
|
593
|
-
"name": "preferences",
|
|
594
|
-
"type": {
|
|
595
|
-
"text": "PatientProfilePreferences | undefined"
|
|
596
|
-
},
|
|
597
|
-
"fieldName": "preferences"
|
|
598
|
-
}
|
|
599
|
-
],
|
|
600
|
-
"superclass": {
|
|
601
|
-
"name": "LitElement",
|
|
602
|
-
"package": "lit"
|
|
603
|
-
},
|
|
604
|
-
"tagName": "bcb-patient-profile-edition",
|
|
605
|
-
"customElement": true
|
|
606
|
-
}
|
|
607
|
-
],
|
|
608
|
-
"exports": [
|
|
609
|
-
{
|
|
610
|
-
"kind": "js",
|
|
611
|
-
"name": "PatientProfileEdition",
|
|
612
|
-
"declaration": {
|
|
613
|
-
"name": "PatientProfileEdition",
|
|
614
|
-
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.ts"
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"kind": "custom-element-definition",
|
|
619
|
-
"name": "bcb-patient-profile-edition",
|
|
620
|
-
"declaration": {
|
|
621
|
-
"name": "PatientProfileEdition",
|
|
622
|
-
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.ts"
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
]
|
|
626
|
-
},
|
|
627
349
|
{
|
|
628
350
|
"kind": "javascript-module",
|
|
629
351
|
"path": "src/shared/constants/edition-options.ts",
|
|
@@ -768,24 +490,6 @@
|
|
|
768
490
|
}
|
|
769
491
|
]
|
|
770
492
|
},
|
|
771
|
-
{
|
|
772
|
-
"kind": "javascript-module",
|
|
773
|
-
"path": "src/shared/interfaces/api-return.interface.ts",
|
|
774
|
-
"declarations": [],
|
|
775
|
-
"exports": []
|
|
776
|
-
},
|
|
777
|
-
{
|
|
778
|
-
"kind": "javascript-module",
|
|
779
|
-
"path": "src/shared/interfaces/patient.ts",
|
|
780
|
-
"declarations": [],
|
|
781
|
-
"exports": []
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
"kind": "javascript-module",
|
|
785
|
-
"path": "src/shared/interfaces/properties.ts",
|
|
786
|
-
"declarations": [],
|
|
787
|
-
"exports": []
|
|
788
|
-
},
|
|
789
493
|
{
|
|
790
494
|
"kind": "javascript-module",
|
|
791
495
|
"path": "src/shared/mocks/pathologies.mock.ts",
|
|
@@ -974,6 +678,24 @@
|
|
|
974
678
|
}
|
|
975
679
|
]
|
|
976
680
|
},
|
|
681
|
+
{
|
|
682
|
+
"kind": "javascript-module",
|
|
683
|
+
"path": "src/shared/interfaces/api-return.interface.ts",
|
|
684
|
+
"declarations": [],
|
|
685
|
+
"exports": []
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"kind": "javascript-module",
|
|
689
|
+
"path": "src/shared/interfaces/patient.ts",
|
|
690
|
+
"declarations": [],
|
|
691
|
+
"exports": []
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"kind": "javascript-module",
|
|
695
|
+
"path": "src/shared/interfaces/properties.ts",
|
|
696
|
+
"declarations": [],
|
|
697
|
+
"exports": []
|
|
698
|
+
},
|
|
977
699
|
{
|
|
978
700
|
"kind": "javascript-module",
|
|
979
701
|
"path": "src/shared/utils/formula-utils.ts",
|
|
@@ -2468,18 +2190,296 @@
|
|
|
2468
2190
|
},
|
|
2469
2191
|
{
|
|
2470
2192
|
"kind": "js",
|
|
2471
|
-
"name": "calculateCreatinineFromGFR",
|
|
2193
|
+
"name": "calculateCreatinineFromGFR",
|
|
2194
|
+
"declaration": {
|
|
2195
|
+
"name": "calculateCreatinineFromGFR",
|
|
2196
|
+
"module": "src/shared/utils/patient-fhir-utils.ts"
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
{
|
|
2200
|
+
"kind": "js",
|
|
2201
|
+
"name": "getPatientMedicalInfo",
|
|
2202
|
+
"declaration": {
|
|
2203
|
+
"name": "getPatientMedicalInfo",
|
|
2204
|
+
"module": "src/shared/utils/patient-fhir-utils.ts"
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
]
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"kind": "javascript-module",
|
|
2211
|
+
"path": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts",
|
|
2212
|
+
"declarations": [
|
|
2213
|
+
{
|
|
2214
|
+
"kind": "variable",
|
|
2215
|
+
"name": "Base",
|
|
2216
|
+
"type": {
|
|
2217
|
+
"text": "WebComponentsStory<any, any>"
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"kind": "variable",
|
|
2222
|
+
"name": "AgeAndSexeEditable",
|
|
2223
|
+
"type": {
|
|
2224
|
+
"text": "WebComponentsStory<any, any>"
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
],
|
|
2228
|
+
"exports": [
|
|
2229
|
+
{
|
|
2230
|
+
"kind": "js",
|
|
2231
|
+
"name": "Base",
|
|
2232
|
+
"declaration": {
|
|
2233
|
+
"name": "Base",
|
|
2234
|
+
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
2235
|
+
}
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"kind": "js",
|
|
2239
|
+
"name": "AgeAndSexeEditable",
|
|
2240
|
+
"declaration": {
|
|
2241
|
+
"name": "AgeAndSexeEditable",
|
|
2242
|
+
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
]
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"kind": "javascript-module",
|
|
2249
|
+
"path": "src/patient-profile/patient-profile-edition/patient-profile-edition.ts",
|
|
2250
|
+
"declarations": [
|
|
2251
|
+
{
|
|
2252
|
+
"kind": "class",
|
|
2253
|
+
"description": "Orchestrateur de la modale d'édition du profil patient : assemble les sous-formulaires\npar domaine clinique (démographie, grossesse/allaitement, pathologies, allergies, rénal,\nhépatique), collecte leurs valeurs à la validation pour les écrire dans le Bundle FHIR,\net gère l'ouverture/fermeture/réinitialisation de la modale.",
|
|
2254
|
+
"name": "PatientProfileEdition",
|
|
2255
|
+
"members": [
|
|
2256
|
+
{
|
|
2257
|
+
"kind": "field",
|
|
2258
|
+
"name": "patientProfile",
|
|
2259
|
+
"type": {
|
|
2260
|
+
"text": "Bundle | undefined"
|
|
2261
|
+
},
|
|
2262
|
+
"attribute": "patient-profile"
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
"kind": "field",
|
|
2266
|
+
"name": "apiUrl",
|
|
2267
|
+
"type": {
|
|
2268
|
+
"text": "string"
|
|
2269
|
+
},
|
|
2270
|
+
"default": "\"https://api-dev.claudebernard.fr\"",
|
|
2271
|
+
"attribute": "api-url"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
"kind": "field",
|
|
2275
|
+
"name": "apiKey",
|
|
2276
|
+
"type": {
|
|
2277
|
+
"text": "string | undefined"
|
|
2278
|
+
},
|
|
2279
|
+
"attribute": "api-key"
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
"kind": "field",
|
|
2283
|
+
"name": "preferences",
|
|
2284
|
+
"type": {
|
|
2285
|
+
"text": "PatientProfilePreferences | undefined"
|
|
2286
|
+
},
|
|
2287
|
+
"attribute": "preferences"
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
"kind": "field",
|
|
2291
|
+
"name": "isPregnancyDivVisible",
|
|
2292
|
+
"type": {
|
|
2293
|
+
"text": "boolean"
|
|
2294
|
+
},
|
|
2295
|
+
"privacy": "private",
|
|
2296
|
+
"default": "false"
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
"kind": "field",
|
|
2300
|
+
"name": "demographicsHasError",
|
|
2301
|
+
"type": {
|
|
2302
|
+
"text": "boolean"
|
|
2303
|
+
},
|
|
2304
|
+
"privacy": "private",
|
|
2305
|
+
"default": "false"
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"kind": "field",
|
|
2309
|
+
"name": "resetKey",
|
|
2310
|
+
"type": {
|
|
2311
|
+
"text": "number"
|
|
2312
|
+
},
|
|
2313
|
+
"privacy": "private",
|
|
2314
|
+
"default": "0"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"kind": "field",
|
|
2318
|
+
"name": "editionModalElement",
|
|
2319
|
+
"type": {
|
|
2320
|
+
"text": "HTMLElement & { open: () => void; close: () => void }"
|
|
2321
|
+
},
|
|
2322
|
+
"privacy": "private"
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
"kind": "field",
|
|
2326
|
+
"name": "demographicsForm",
|
|
2327
|
+
"type": {
|
|
2328
|
+
"text": "PatientDemographicsForm"
|
|
2329
|
+
},
|
|
2330
|
+
"privacy": "private"
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
"kind": "field",
|
|
2334
|
+
"name": "reproductiveForm",
|
|
2335
|
+
"type": {
|
|
2336
|
+
"text": "PatientReproductiveForm"
|
|
2337
|
+
},
|
|
2338
|
+
"privacy": "private"
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
"kind": "field",
|
|
2342
|
+
"name": "pathologiesForm",
|
|
2343
|
+
"type": {
|
|
2344
|
+
"text": "PatientPathologiesForm"
|
|
2345
|
+
},
|
|
2346
|
+
"privacy": "private"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
"kind": "field",
|
|
2350
|
+
"name": "allergiesForm",
|
|
2351
|
+
"type": {
|
|
2352
|
+
"text": "PatientAllergiesForm"
|
|
2353
|
+
},
|
|
2354
|
+
"privacy": "private"
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"kind": "field",
|
|
2358
|
+
"name": "renalForm",
|
|
2359
|
+
"type": {
|
|
2360
|
+
"text": "PatientRenalForm"
|
|
2361
|
+
},
|
|
2362
|
+
"privacy": "private"
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
"kind": "field",
|
|
2366
|
+
"name": "hepaticForm",
|
|
2367
|
+
"type": {
|
|
2368
|
+
"text": "PatientHepaticForm"
|
|
2369
|
+
},
|
|
2370
|
+
"privacy": "private"
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"kind": "method",
|
|
2374
|
+
"name": "open",
|
|
2375
|
+
"privacy": "public",
|
|
2376
|
+
"return": {
|
|
2377
|
+
"type": {
|
|
2378
|
+
"text": "void"
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"kind": "method",
|
|
2384
|
+
"name": "handleCancel",
|
|
2385
|
+
"privacy": "private",
|
|
2386
|
+
"return": {
|
|
2387
|
+
"type": {
|
|
2388
|
+
"text": "void"
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
"kind": "method",
|
|
2394
|
+
"name": "handleDemographicsChange",
|
|
2395
|
+
"privacy": "private",
|
|
2396
|
+
"return": {
|
|
2397
|
+
"type": {
|
|
2398
|
+
"text": "void"
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
"parameters": [
|
|
2402
|
+
{
|
|
2403
|
+
"name": "event",
|
|
2404
|
+
"type": {
|
|
2405
|
+
"text": "CustomEvent<DemographicsChangeEventDetail>"
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
]
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
"kind": "method",
|
|
2412
|
+
"name": "validateForm",
|
|
2413
|
+
"privacy": "private",
|
|
2414
|
+
"return": {
|
|
2415
|
+
"type": {
|
|
2416
|
+
"text": "void"
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
],
|
|
2421
|
+
"events": [
|
|
2422
|
+
{
|
|
2423
|
+
"name": "editPatientProfile",
|
|
2424
|
+
"type": {
|
|
2425
|
+
"text": "CustomEvent"
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
],
|
|
2429
|
+
"attributes": [
|
|
2430
|
+
{
|
|
2431
|
+
"name": "patient-profile",
|
|
2432
|
+
"type": {
|
|
2433
|
+
"text": "Bundle | undefined"
|
|
2434
|
+
},
|
|
2435
|
+
"fieldName": "patientProfile"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "api-url",
|
|
2439
|
+
"type": {
|
|
2440
|
+
"text": "string"
|
|
2441
|
+
},
|
|
2442
|
+
"default": "\"https://api-dev.claudebernard.fr\"",
|
|
2443
|
+
"fieldName": "apiUrl"
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"name": "api-key",
|
|
2447
|
+
"type": {
|
|
2448
|
+
"text": "string | undefined"
|
|
2449
|
+
},
|
|
2450
|
+
"fieldName": "apiKey"
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
"name": "preferences",
|
|
2454
|
+
"type": {
|
|
2455
|
+
"text": "PatientProfilePreferences | undefined"
|
|
2456
|
+
},
|
|
2457
|
+
"fieldName": "preferences"
|
|
2458
|
+
}
|
|
2459
|
+
],
|
|
2460
|
+
"superclass": {
|
|
2461
|
+
"name": "LitElement",
|
|
2462
|
+
"package": "lit"
|
|
2463
|
+
},
|
|
2464
|
+
"tagName": "bcb-patient-profile-edition",
|
|
2465
|
+
"customElement": true
|
|
2466
|
+
}
|
|
2467
|
+
],
|
|
2468
|
+
"exports": [
|
|
2469
|
+
{
|
|
2470
|
+
"kind": "js",
|
|
2471
|
+
"name": "PatientProfileEdition",
|
|
2472
2472
|
"declaration": {
|
|
2473
|
-
"name": "
|
|
2474
|
-
"module": "src/
|
|
2473
|
+
"name": "PatientProfileEdition",
|
|
2474
|
+
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.ts"
|
|
2475
2475
|
}
|
|
2476
2476
|
},
|
|
2477
2477
|
{
|
|
2478
|
-
"kind": "
|
|
2479
|
-
"name": "
|
|
2478
|
+
"kind": "custom-element-definition",
|
|
2479
|
+
"name": "bcb-patient-profile-edition",
|
|
2480
2480
|
"declaration": {
|
|
2481
|
-
"name": "
|
|
2482
|
-
"module": "src/
|
|
2481
|
+
"name": "PatientProfileEdition",
|
|
2482
|
+
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.ts"
|
|
2483
2483
|
}
|
|
2484
2484
|
}
|
|
2485
2485
|
]
|
|
@@ -3006,6 +3006,36 @@
|
|
|
3006
3006
|
"privacy": "private",
|
|
3007
3007
|
"readonly": true
|
|
3008
3008
|
},
|
|
3009
|
+
{
|
|
3010
|
+
"kind": "field",
|
|
3011
|
+
"name": "NARROW_VIEWPORT_QUERY",
|
|
3012
|
+
"type": {
|
|
3013
|
+
"text": "string"
|
|
3014
|
+
},
|
|
3015
|
+
"privacy": "private",
|
|
3016
|
+
"static": true,
|
|
3017
|
+
"readonly": true,
|
|
3018
|
+
"default": "\"(max-width: 949px)\""
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"kind": "field",
|
|
3022
|
+
"name": "narrowViewportQuery",
|
|
3023
|
+
"privacy": "private",
|
|
3024
|
+
"readonly": true
|
|
3025
|
+
},
|
|
3026
|
+
{
|
|
3027
|
+
"kind": "field",
|
|
3028
|
+
"name": "datePickerPlacement",
|
|
3029
|
+
"type": {
|
|
3030
|
+
"text": "\"bottom\" | \"bottom-right\""
|
|
3031
|
+
}
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
"kind": "field",
|
|
3035
|
+
"name": "updateDatePickerPlacement",
|
|
3036
|
+
"privacy": "private",
|
|
3037
|
+
"readonly": true
|
|
3038
|
+
},
|
|
3009
3039
|
{
|
|
3010
3040
|
"kind": "field",
|
|
3011
3041
|
"name": "patientBirthDate",
|
|
@@ -3958,6 +3988,16 @@
|
|
|
3958
3988
|
}
|
|
3959
3989
|
]
|
|
3960
3990
|
},
|
|
3991
|
+
{
|
|
3992
|
+
"kind": "method",
|
|
3993
|
+
"name": "handleGestationalWeeksChange",
|
|
3994
|
+
"privacy": "private",
|
|
3995
|
+
"return": {
|
|
3996
|
+
"type": {
|
|
3997
|
+
"text": "void"
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
},
|
|
3961
4001
|
{
|
|
3962
4002
|
"kind": "method",
|
|
3963
4003
|
"name": "getValue",
|
|
@@ -1395,6 +1395,11 @@ var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
|
1395
1395
|
let PatientDemographicsForm = class extends i$2 {
|
|
1396
1396
|
constructor() {
|
|
1397
1397
|
super(...arguments);
|
|
1398
|
+
this.narrowViewportQuery = window.matchMedia(PatientDemographicsForm.NARROW_VIEWPORT_QUERY);
|
|
1399
|
+
this.datePickerPlacement = this.narrowViewportQuery.matches ? "bottom-right" : "bottom";
|
|
1400
|
+
this.updateDatePickerPlacement = (event) => {
|
|
1401
|
+
this.datePickerPlacement = event.matches ? "bottom-right" : "bottom";
|
|
1402
|
+
};
|
|
1398
1403
|
this.patientBirthDate = "";
|
|
1399
1404
|
this.patientAgeValue = void 0;
|
|
1400
1405
|
this.patientUnitAge = "ans";
|
|
@@ -1416,6 +1421,14 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1416
1421
|
get isSexeReadOnly() {
|
|
1417
1422
|
return this.preferences?.forms?.sexe?.readOnly ?? false;
|
|
1418
1423
|
}
|
|
1424
|
+
connectedCallback() {
|
|
1425
|
+
super.connectedCallback();
|
|
1426
|
+
this.narrowViewportQuery.addEventListener("change", this.updateDatePickerPlacement);
|
|
1427
|
+
}
|
|
1428
|
+
disconnectedCallback() {
|
|
1429
|
+
super.disconnectedCallback();
|
|
1430
|
+
this.narrowViewportQuery.removeEventListener("change", this.updateDatePickerPlacement);
|
|
1431
|
+
}
|
|
1419
1432
|
get patientAge() {
|
|
1420
1433
|
return this.patientAgeValue === void 0 ? "" : `${this.patientAgeValue} ${this.patientUnitAge}`;
|
|
1421
1434
|
}
|
|
@@ -1457,7 +1470,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1457
1470
|
this.patientBirthDate = birthDate?.toISOString().split("T")[0] ?? "";
|
|
1458
1471
|
let isPregnancyEligible = false;
|
|
1459
1472
|
if (birthDate) {
|
|
1460
|
-
this.
|
|
1473
|
+
this.birthDateInput.setAttribute("warning-msg", "");
|
|
1461
1474
|
const { age, unit } = calculateAgeFromBirthDate(birthDate);
|
|
1462
1475
|
this.patientAgeValue = age;
|
|
1463
1476
|
this.patientUnitAge = unit;
|
|
@@ -1465,7 +1478,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1465
1478
|
} else {
|
|
1466
1479
|
this.patientAgeValue = void 0;
|
|
1467
1480
|
this.ageErrorMessageInput = "L'âge est requis";
|
|
1468
|
-
this.ageInputText.setAttribute("warning-msg",
|
|
1481
|
+
this.ageInputText.setAttribute("warning-msg", "");
|
|
1469
1482
|
}
|
|
1470
1483
|
this.emitChange(isPregnancyEligible, false);
|
|
1471
1484
|
}
|
|
@@ -1493,7 +1506,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1493
1506
|
const today = /* @__PURE__ */ new Date();
|
|
1494
1507
|
if (!birthDateValue || isNaN(birthDate.getTime()) || birthDate > today) {
|
|
1495
1508
|
this.ageErrorMessageInput = "La date de naissance n'est pas valide";
|
|
1496
|
-
this.
|
|
1509
|
+
this.birthDateInput.setAttribute("warning-msg", this.ageErrorMessageInput);
|
|
1497
1510
|
this.patientAgeValue = void 0;
|
|
1498
1511
|
this.emitChange(false, true);
|
|
1499
1512
|
return;
|
|
@@ -1503,7 +1516,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1503
1516
|
this.patientAgeValue = age;
|
|
1504
1517
|
this.patientUnitAge = unit;
|
|
1505
1518
|
this.ageErrorMessageInput = this.getAgeErrorMessage(age);
|
|
1506
|
-
this.
|
|
1519
|
+
this.birthDateInput.setAttribute("warning-msg", this.ageErrorMessageInput);
|
|
1507
1520
|
this.emitChange(this.isPregnancyAge, true);
|
|
1508
1521
|
}
|
|
1509
1522
|
verifySizeInput() {
|
|
@@ -1551,7 +1564,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1551
1564
|
${this.isAgeDisplay ? b`
|
|
1552
1565
|
<div class="${PREFIX}-edition-modal-little-section">
|
|
1553
1566
|
<span>Date de naissance</span>
|
|
1554
|
-
<bcbd-input data-test-id="birth-date-input" id="birthDateInput" ?disabled=${this.isAgeReadOnly} .value=${this.patientBirthDate} type="date" aria-label="Date de naissance" warning-msg="" ?readonly=${this.isAgeReadOnly} @change=${this.verifyAgeInput}></bcbd-input>
|
|
1567
|
+
<bcbd-input data-test-id="birth-date-input" id="birthDateInput" ?disabled=${this.isAgeReadOnly} .value=${this.patientBirthDate} type="date" date-picker-placement=${this.datePickerPlacement} aria-label="Date de naissance" warning-msg="" ?readonly=${this.isAgeReadOnly} @change=${this.verifyAgeInput}></bcbd-input>
|
|
1555
1568
|
</div>
|
|
1556
1569
|
<div class="${PREFIX}-edition-modal-little-section">
|
|
1557
1570
|
<span>Age</span>
|
|
@@ -1576,6 +1589,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1576
1589
|
`;
|
|
1577
1590
|
}
|
|
1578
1591
|
};
|
|
1592
|
+
PatientDemographicsForm.NARROW_VIEWPORT_QUERY = "(max-width: 949px)";
|
|
1579
1593
|
PatientDemographicsForm.styles = i$5`${r$4(patientDemographicsFormCSS)}`;
|
|
1580
1594
|
__decorateClass$8([
|
|
1581
1595
|
n2({ type: Object, attribute: "patient-profile" })
|
|
@@ -1583,6 +1597,9 @@ __decorateClass$8([
|
|
|
1583
1597
|
__decorateClass$8([
|
|
1584
1598
|
n2({ type: Object })
|
|
1585
1599
|
], PatientDemographicsForm.prototype, "preferences", 2);
|
|
1600
|
+
__decorateClass$8([
|
|
1601
|
+
r()
|
|
1602
|
+
], PatientDemographicsForm.prototype, "datePickerPlacement", 2);
|
|
1586
1603
|
__decorateClass$8([
|
|
1587
1604
|
r()
|
|
1588
1605
|
], PatientDemographicsForm.prototype, "patientBirthDate", 2);
|
|
@@ -1656,6 +1673,10 @@ let PatientReproductiveForm = class extends i$2 {
|
|
|
1656
1673
|
handleBreastfeeding(event) {
|
|
1657
1674
|
this.breastfeeding = event.detail;
|
|
1658
1675
|
}
|
|
1676
|
+
handleGestationalWeeksChange() {
|
|
1677
|
+
const gestationalWeeksValue = this.gestationalWeeksInput?.value ?? "";
|
|
1678
|
+
this.isPregnant = gestationalWeeksValue !== "";
|
|
1679
|
+
}
|
|
1659
1680
|
getValue() {
|
|
1660
1681
|
if (!this.visible) {
|
|
1661
1682
|
return { isPregnant: false, breastfeeding: false, gestationalWeeks: 0 };
|
|
@@ -1673,7 +1694,7 @@ let PatientReproductiveForm = class extends i$2 {
|
|
|
1673
1694
|
return b`
|
|
1674
1695
|
<div class="${PREFIX}-edition-modal-pregnant-div">
|
|
1675
1696
|
<bcbd-checkbox data-test-id="pregnancy-checkbox" id="pregnancyCheckbox" .checked=${this.isPregnant} label="Grossesse" color="primary" @change=${this.handlePregnancy}></bcbd-checkbox>
|
|
1676
|
-
<bcbd-input data-test-id="gestational-input" id="gestationalWeeksInput" .value=${getPatientAmenorrheaStatus(this.patientProfile) ??
|
|
1697
|
+
<bcbd-input data-test-id="gestational-input" id="gestationalWeeksInput" .value=${getPatientAmenorrheaStatus(this.patientProfile) ?? ""} type="number" warning-msg="" label="Nombre de semaines" placeholder="" @change=${this.handleGestationalWeeksChange}></bcbd-input>
|
|
1677
1698
|
<bcbd-checkbox data-test-id="breastfeeding-checkbox" id="breastfeedingCheckbox" .checked=${this.breastfeeding} label="Allaitement" color="primary" @change=${this.handleBreastfeeding}></bcbd-checkbox>
|
|
1678
1699
|
</div>`;
|
|
1679
1700
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudebernard/patient-profile-element",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"main": "dist/patient-profile.es.js",
|
|
5
5
|
"module": "dist/patient-profile.es.js",
|
|
6
6
|
"types": "dist/patient-profile.d.ts",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"vitest": "^4.0.7"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@claudebernard/design-system": "^2.
|
|
87
|
+
"@claudebernard/design-system": "^2.37.2",
|
|
88
88
|
"@claudebernard/types": "^0.35.0 || ^0.36.0"
|
|
89
89
|
},
|
|
90
90
|
"customElements": "dist/custom-elements.json",
|