@postxl/schema 0.0.2

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 (75) hide show
  1. package/LICENSE +50 -0
  2. package/README.md +320 -0
  3. package/dist/enum/enum.brands.d.ts +11 -0
  4. package/dist/enum/enum.brands.js +19 -0
  5. package/dist/enum/enum.d.ts +49 -0
  6. package/dist/enum/enum.defaults.d.ts +41 -0
  7. package/dist/enum/enum.defaults.js +105 -0
  8. package/dist/enum/enum.js +6 -0
  9. package/dist/enum/enum.json-decoder.d.ts +61 -0
  10. package/dist/enum/enum.json-decoder.js +51 -0
  11. package/dist/enum/enum.transformer.d.ts +12 -0
  12. package/dist/enum/enum.transformer.js +76 -0
  13. package/dist/enum/enum.types.d.ts +14 -0
  14. package/dist/enum/enum.types.js +2 -0
  15. package/dist/enum/index.d.ts +6 -0
  16. package/dist/enum/index.js +22 -0
  17. package/dist/field/defaults.d.ts +12 -0
  18. package/dist/field/defaults.js +78 -0
  19. package/dist/field/discriminated-union.d.ts +125 -0
  20. package/dist/field/discriminated-union.js +207 -0
  21. package/dist/field/enum.d.ts +65 -0
  22. package/dist/field/enum.js +111 -0
  23. package/dist/field/field.d.ts +483 -0
  24. package/dist/field/field.js +68 -0
  25. package/dist/field/id.d.ts +152 -0
  26. package/dist/field/id.js +104 -0
  27. package/dist/field/index.d.ts +11 -0
  28. package/dist/field/index.js +27 -0
  29. package/dist/field/relation.d.ts +88 -0
  30. package/dist/field/relation.js +138 -0
  31. package/dist/field/scalar.d.ts +179 -0
  32. package/dist/field/scalar.js +197 -0
  33. package/dist/field/shared/brands.d.ts +38 -0
  34. package/dist/field/shared/brands.js +109 -0
  35. package/dist/field/shared/decoders.d.ts +17 -0
  36. package/dist/field/shared/decoders.js +88 -0
  37. package/dist/field/shared/seed.d.ts +32 -0
  38. package/dist/field/shared/seed.js +63 -0
  39. package/dist/field/shared/types.d.ts +73 -0
  40. package/dist/field/shared/types.js +2 -0
  41. package/dist/field/shared/utils.d.ts +26 -0
  42. package/dist/field/shared/utils.js +52 -0
  43. package/dist/index.d.ts +12 -0
  44. package/dist/index.js +25 -0
  45. package/dist/model/index.d.ts +5 -0
  46. package/dist/model/index.js +21 -0
  47. package/dist/model/model.brands.d.ts +7 -0
  48. package/dist/model/model.brands.js +10 -0
  49. package/dist/model/model.defaults.d.ts +28 -0
  50. package/dist/model/model.defaults.js +304 -0
  51. package/dist/model/model.json-decoder.d.ts +94 -0
  52. package/dist/model/model.json-decoder.js +107 -0
  53. package/dist/model/model.transformer.d.ts +93 -0
  54. package/dist/model/model.transformer.js +183 -0
  55. package/dist/model/model.types.d.ts +37 -0
  56. package/dist/model/model.types.js +2 -0
  57. package/dist/project-schema/project-schema.brands.d.ts +10 -0
  58. package/dist/project-schema/project-schema.brands.js +17 -0
  59. package/dist/project-schema/project-schema.defaults.d.ts +16 -0
  60. package/dist/project-schema/project-schema.defaults.js +53 -0
  61. package/dist/project-schema/project-schema.json-decoder.d.ts +285 -0
  62. package/dist/project-schema/project-schema.json-decoder.js +145 -0
  63. package/dist/project-schema/project-schema.transformer.d.ts +284 -0
  64. package/dist/project-schema/project-schema.transformer.js +444 -0
  65. package/dist/project-schema/project-schema.types.d.ts +77 -0
  66. package/dist/project-schema/project-schema.types.js +2 -0
  67. package/dist/samples/la.schema.json +2055 -0
  68. package/dist/samples/mca.schema.json +830 -0
  69. package/dist/samples/ring.schema.json +879 -0
  70. package/dist/samples/sample-schemas.d.ts +1896 -0
  71. package/dist/samples/sample-schemas.js +20 -0
  72. package/dist/samples/simple.schema.json +250 -0
  73. package/dist/samples/subex.schema.json +1188 -0
  74. package/dist/samples/usp-msm.schema.json +2515 -0
  75. package/package.json +57 -0
@@ -0,0 +1,2515 @@
1
+ {
2
+ "name": "USP Medical Supply Map",
3
+ "slug": "usp-msm2",
4
+ "description": "",
5
+ "version": "2.0.1",
6
+ "schemas": ["PXL", "MSM", "User", "KSM"],
7
+ "defaultSchema": "MSM",
8
+ "systemUser": {
9
+ "name": "System",
10
+ "email": "system@postxl.com",
11
+ "watchlistId": null
12
+ },
13
+ "standardModels": [],
14
+ "models": [
15
+ {
16
+ "name": "Config",
17
+ "description": "System configuration.",
18
+ "schema": "PXL",
19
+ "repository": {
20
+ "type": "DatabaseDirect"
21
+ },
22
+ "fields": [
23
+ {
24
+ "name": "triggerReseed",
25
+ "type": "Boolean",
26
+ "label": "Trigger reseed?",
27
+ "description": "If true, the system will reseed the data upon the next startup."
28
+ },
29
+ {
30
+ "name": "liveServer",
31
+ "type": "ServerIdentifier",
32
+ "label": "Current live Server",
33
+ "description": "The current live server. When multiple servers are used, this indicates which server currently serves the live data."
34
+ }
35
+ ],
36
+ "standardFields": ["id"],
37
+ "actions": {
38
+ "switchServer": "Switch live and staging server",
39
+ "reseedData": "Trigger a reseed of the data. This will reset the MSM and KSM data and reimport it."
40
+ }
41
+ },
42
+ {
43
+ "name": "User",
44
+ "description": "A user of the application.",
45
+ "schema": "User",
46
+ "repository": {
47
+ "type": "DatabaseDirect"
48
+ },
49
+ "fields": [
50
+ {
51
+ "name": "sub",
52
+ "type": "String?",
53
+ "isUnique": true,
54
+ "hasIndex": true,
55
+ "description": "The OpenID Connect provided subject identifier.",
56
+ "faker": "string.uuid()"
57
+ },
58
+ {
59
+ "name": "name",
60
+ "type": "String",
61
+ "label": "Name",
62
+ "description": "The name of the user.",
63
+ "faker": "person.fullName"
64
+ },
65
+ {
66
+ "name": "email",
67
+ "type": "String",
68
+ "description": "The email of the user.",
69
+ "faker": "internet.email"
70
+ },
71
+ {
72
+ "name": "profilePictureUrl",
73
+ "type": "String?",
74
+ "description": "The URL of the profile picture of the user.",
75
+ "faker": "image.avatar"
76
+ },
77
+ {
78
+ "name": "watchlistId",
79
+ "type": "Watchlist?",
80
+ "description": "The user's default watchlist. This is used when an NdcGroup is 'starred' and no watchlist is specified."
81
+ }
82
+ ],
83
+ "seed": [
84
+ {
85
+ "id": "System",
86
+ "name": "System",
87
+ "email": "admin@postxl.com",
88
+ "profilePictureUrl": "https://postxl.com/images/team/user.png",
89
+ "sub": "null"
90
+ }
91
+ ],
92
+ "faker": {
93
+ "items": 3
94
+ }
95
+ },
96
+ {
97
+ "name": "Watchlist",
98
+ "description": "A list containing ndcGroups. Either created directly by a user - or centrally provided by USP admins.",
99
+ "schema": "User",
100
+ "standardFields": ["id"],
101
+ "repository": {
102
+ "type": "DatabaseDirect"
103
+ },
104
+ "fields": [
105
+ {
106
+ "name": "userId",
107
+ "type": "User?",
108
+ "label": "User",
109
+ "description": "The user that created the watchlist."
110
+ },
111
+ {
112
+ "name": "isGlobal",
113
+ "type": "Boolean",
114
+ "label": "Global",
115
+ "description": "Indicates whether the watchlist is global. In case it is global, only admins can modify it, else the user can modify it."
116
+ },
117
+ {
118
+ "name": "isUserDefaultWatchlist",
119
+ "type": "Boolean?",
120
+ "label": "User Default Watchlist",
121
+ "description": "Indicates whether the watchlist is the user's default."
122
+ },
123
+ {
124
+ "name": "name",
125
+ "type": "String",
126
+ "label": "Name",
127
+ "description": "The name of the watchlist."
128
+ },
129
+ {
130
+ "name": "description",
131
+ "type": "String?",
132
+ "label": "Description",
133
+ "description": "A description of the watchlist."
134
+ }
135
+ ],
136
+ "actions": {
137
+ "rename": "Rename the watchlist.",
138
+ "publish": "Publish the watchlist to make it available to all users.",
139
+ "unpublish": "Unpublish the watchlist to make it unavailable to all users."
140
+ }
141
+ },
142
+ {
143
+ "name": "NdcGroupWatchlist",
144
+ "description": "NdcGroups that are assigned to a watchlist.",
145
+ "schema": "User",
146
+ "repository": {
147
+ "type": "DatabaseDirect"
148
+ },
149
+ "standardFields": ["id"],
150
+ "fields": [
151
+ {
152
+ "name": "watchlistId",
153
+ "type": "Watchlist",
154
+ "label": "Watchlist"
155
+ },
156
+ {
157
+ "name": "ndcGroupId",
158
+ "type": "String",
159
+ "label": "NDC Group"
160
+ }
161
+ ],
162
+ "seed": [],
163
+ "faker": {
164
+ "items": 0
165
+ },
166
+ "actions": {
167
+ "addNdcGroup": "Add an NDC group to a watchlist.",
168
+ "removeNdcGroup": "Remove an NDC group from a watchlist."
169
+ }
170
+ },
171
+ {
172
+ "name": "Notification",
173
+ "description": "Notification about relevant events.",
174
+ "schema": "User",
175
+ "repository": {
176
+ "type": "DatabaseDirect"
177
+ },
178
+ "actions": {
179
+ "saveDraft": "Save the notification as a draft.",
180
+ "createRiskChangeDraft": "Create a draft for a risk change notification.",
181
+ "sendNotification": "Send the notification."
182
+ },
183
+ "standardFields": ["id", "createdAt", "updatedAt"],
184
+ "fields": [
185
+ {
186
+ "name": "isDraft",
187
+ "type": "Boolean",
188
+ "description": "Indicates whether the notification is a draft."
189
+ },
190
+ {
191
+ "name": "title",
192
+ "type": "String",
193
+ "description": "The title of the notification."
194
+ },
195
+ {
196
+ "name": "description",
197
+ "type": "String",
198
+ "description": "The description of the notification."
199
+ },
200
+ {
201
+ "name": "summary",
202
+ "type": "String",
203
+ "description": "A short summary of the notification."
204
+ },
205
+ {
206
+ "name": "linkText",
207
+ "type": "String?",
208
+ "description": "The text to display for the support link"
209
+ },
210
+ {
211
+ "name": "linkUrl",
212
+ "type": "String?",
213
+ "description": "The URL to navigate to when the support link is clicked."
214
+ },
215
+ {
216
+ "name": "isRelevantToAllUsers",
217
+ "type": "Boolean",
218
+ "description": "Indicates whether the notification is relevant to all users."
219
+ },
220
+ {
221
+ "name": "sendAsMail",
222
+ "type": "Boolean",
223
+ "description": "Indicates whether the notification should be sent as an email."
224
+ },
225
+ {
226
+ "name": "type",
227
+ "type": "NewsType",
228
+ "description": "The type of the notification."
229
+ },
230
+ {
231
+ "name": "linkedId",
232
+ "type": "String?",
233
+ "description": "Contains the the Id the linked item. Depends on the `type`, e.g. if type = News, it will contain the newsId."
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ "name": "UserNotification",
239
+ "description": "Relevant information about a notification for a specific user.",
240
+ "repository": {
241
+ "type": "DatabaseDirect"
242
+ },
243
+ "actions": {
244
+ "createForNewUser": "Create notifications for a new user.",
245
+ "markAsRead": "Mark the notification as read.",
246
+ "markAsUnread": "Mark the notification as unread.",
247
+ "markAsSent": "Mark the notification as sent."
248
+ },
249
+ "standardFields": ["id", "createdAt", "updatedAt"],
250
+ "standardActions": [],
251
+ "fields": [
252
+ {
253
+ "name": "userId",
254
+ "type": "User",
255
+ "description": "The user that the notification is relevant to."
256
+ },
257
+ {
258
+ "name": "notificationId",
259
+ "type": "Notification",
260
+ "description": "The notification that is relevant to the user."
261
+ },
262
+ {
263
+ "name": "isRead",
264
+ "type": "Boolean",
265
+ "description": "Indicates whether the user has read the notification."
266
+ },
267
+ {
268
+ "name": "wasSentAsMail",
269
+ "type": "Boolean",
270
+ "description": "Indicates whether the notification has been sent as an email."
271
+ },
272
+ {
273
+ "name": "isDeleted",
274
+ "type": "Boolean",
275
+ "description": "Indicates whether the notification has been deleted."
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "name": "NotificationFacility",
281
+ "description": "Facilities related to notifications.",
282
+ "repository": {
283
+ "type": "DatabaseDirect"
284
+ },
285
+ "standardFields": ["id"],
286
+ "fields": [
287
+ {
288
+ "name": "notificationId",
289
+ "type": "Notification",
290
+ "description": "The notification that the facility is related to."
291
+ },
292
+ {
293
+ "name": "facilityKey",
294
+ "type": "String",
295
+ "description": "The key of the facility. We do not link directly, as facility is ephemeral."
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "name": "NotificationDrugProduct",
301
+ "description": "Contains information about drug products related to a notification.",
302
+ "repository": {
303
+ "type": "DatabaseDirect"
304
+ },
305
+ "standardFields": ["id"],
306
+ "fields": [
307
+ {
308
+ "name": "notificationId",
309
+ "type": "Notification",
310
+ "description": "The notification that the drug product is related to."
311
+ },
312
+ {
313
+ "name": "drugProductKey",
314
+ "type": "String",
315
+ "description": "The key (Id) of the drug product. We do not link directly, as the drug product is ephemeral."
316
+ },
317
+ {
318
+ "name": "riskScoreChange",
319
+ "type": "Float?",
320
+ "label": "Risk score change",
321
+ "description": "The change in risk score since the last period."
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ "name": "Action",
327
+ "description": "An Action represents an attempt to change to the business state. This can be a simple CUD operation, e.g. creating a new entry for a model - or a complex business operation, e.g. approving a publication.",
328
+ "isReadonly": true,
329
+ "schema": "PXL",
330
+ "standardFields": ["id", "createdAt", "updatedAt"],
331
+ "labelField": "id",
332
+ "fields": [
333
+ {
334
+ "name": "migrationOrder",
335
+ "type": "Int?",
336
+ "description": "If it is a migration action, the migrationOrder is the order of the migration within the migration sequence."
337
+ },
338
+ {
339
+ "name": "userId",
340
+ "type": "User?",
341
+ "description": "The user that initiated the action."
342
+ },
343
+ {
344
+ "name": "scope",
345
+ "type": "String",
346
+ "description": "The scope represents the discriminator for the business logic scope of the action. This typically corresponds to a model, but if business logic has more complex it can also map to other businessLogic services."
347
+ },
348
+ {
349
+ "name": "type",
350
+ "type": "String?",
351
+ "description": "The type represents the discriminator for the action type of logic. It is used within the scoped business logic service to discriminate which action to execute."
352
+ },
353
+ {
354
+ "name": "payload",
355
+ "type": "String?",
356
+ "description": "The payload is a JSON string that contains the data required to execute the action."
357
+ },
358
+ {
359
+ "name": "status",
360
+ "type": "ActionStatus",
361
+ "description": "The status of the action."
362
+ },
363
+ {
364
+ "name": "error",
365
+ "type": "String?",
366
+ "description": "In case of an error, the error field contains JSON string with the error details."
367
+ },
368
+ {
369
+ "name": "result",
370
+ "type": "String?",
371
+ "description": "In case of a successful action, the result field contains the JSON string with the result details."
372
+ }
373
+ ],
374
+ "repository": {
375
+ "type": "InMemory"
376
+ },
377
+ "faker": {
378
+ "items": 0
379
+ }
380
+ },
381
+ {
382
+ "name": "ActionOperation",
383
+ "description": "An `ActionOperation` represents a step in an action. It can either be a `Transformation` or a `Mutation`.\nA `Transformation` changes the payload with some operation into a new shape. This could be extracting data from an Excel file, running a Zod decoder or other operations.\nA `Mutation` represents a direct change (CUD) to a data entry of a model.",
384
+ "isReadonly": true,
385
+ "schema": "PXL",
386
+ "standardFields": ["id", "createdAt", "updatedAt"],
387
+ "labelField": "id",
388
+ "fields": [
389
+ {
390
+ "name": "actionId",
391
+ "type": "Action?",
392
+ "description": "The action that initiated the operation."
393
+ },
394
+ {
395
+ "name": "order",
396
+ "type": "Int",
397
+ "description": "The order of the operation within the action."
398
+ },
399
+ {
400
+ "name": "payload",
401
+ "type": "String?",
402
+ "description": "The payload is a JSON string that contains the data required to execute the mutation."
403
+ },
404
+ {
405
+ "name": "status",
406
+ "type": "MutationStatus",
407
+ "description": "The status of the mutation: 'Started' | 'Success' | 'Error'"
408
+ },
409
+ {
410
+ "name": "result",
411
+ "type": "String?",
412
+ "description": "The result of the operation. Depending on mutation kind, it contains:\nCreate: new entity\nCreateMany: Array of newly created entities\nUpdate: Updated entity\nUpdateMany: Array of updated entities\nDelete, DeleteMany: Null\nClone: The cloned entity\nTransformation: Depends on the transformation"
413
+ },
414
+ {
415
+ "name": "error",
416
+ "type": "String?",
417
+ "description": "In case of an error: JSON string with the error details."
418
+ },
419
+ {
420
+ "name": "content",
421
+ "type": "DiscriminatedUnion",
422
+ "members": [
423
+ {
424
+ "type": "Transformation",
425
+ "fields": [
426
+ {
427
+ "name": "operation",
428
+ "type": "String",
429
+ "description": "The operation that is executed on the payload."
430
+ }
431
+ ]
432
+ },
433
+ {
434
+ "type": "Mutation",
435
+ "fields": [
436
+ {
437
+ "name": "model",
438
+ "type": "String",
439
+ "description": "Which model is affected by the mutation."
440
+ },
441
+ {
442
+ "name": "kind",
443
+ "type": "MutationKind",
444
+ "description": "The type of the mutation: 'Create' | 'CreateMany' | 'Update' | 'Upsert' | 'Delete' | ..."
445
+ },
446
+ {
447
+ "name": "entityId",
448
+ "type": "String?",
449
+ "description": "The id of the affected entity. Depending on the type of the mutation, this is the following:\n\t'Create': the newly created entity's ID\n\t'CreateMany': A stringified array of all created entities' IDs\n\t'Update' & 'Delete': id that was provided as input."
450
+ },
451
+ {
452
+ "name": "sourceEntity",
453
+ "type": "String?",
454
+ "description": "The original entity before the mutation was executed. Null in case of a create mutation."
455
+ }
456
+ ]
457
+ }
458
+ ]
459
+ }
460
+ ],
461
+ "repository": {
462
+ "type": "InMemory"
463
+ },
464
+ "faker": {
465
+ "items": 0
466
+ }
467
+ },
468
+ {
469
+ "name": "MajorClassMinorClass",
470
+ "description": "A lookup table, relating major and minor classes.",
471
+ "repository": {
472
+ "type": "InMemory"
473
+ },
474
+ "fields": [
475
+ {
476
+ "name": "majorClassId",
477
+ "type": "MajorClass",
478
+ "label": "Major class"
479
+ },
480
+ {
481
+ "name": "minorClassId",
482
+ "type": "MinorClass",
483
+ "label": "Minor class"
484
+ }
485
+ ],
486
+ "standardFields": ["id"]
487
+ },
488
+ {
489
+ "name": "MajorClass",
490
+ "repository": {
491
+ "type": "InMemory"
492
+ },
493
+ "fields": [
494
+ {
495
+ "name": "name",
496
+ "type": "String",
497
+ "label": "Name",
498
+ "description": "The name of the major class.",
499
+ "isUnique": true
500
+ }
501
+ ],
502
+ "standardFields": ["id"],
503
+ "seed": [
504
+ {
505
+ "id": "Pain",
506
+ "name": "Pain"
507
+ },
508
+ {
509
+ "id": "Dermatologics",
510
+ "name": "Dermatologics"
511
+ },
512
+ {
513
+ "id": "Immunology",
514
+ "name": "Immunology"
515
+ }
516
+ ]
517
+ },
518
+ {
519
+ "name": "MinorClass",
520
+ "repository": {
521
+ "type": "InMemory"
522
+ },
523
+ "fields": [
524
+ {
525
+ "name": "name",
526
+ "type": "String",
527
+ "label": "Name",
528
+ "description": "The name of the minor class.",
529
+ "isUnique": true
530
+ }
531
+ ],
532
+ "standardFields": ["id"],
533
+ "seed": [
534
+ {
535
+ "id": "Antivirals",
536
+ "name": "Antivirals"
537
+ },
538
+ {
539
+ "id": "Corticosteroids",
540
+ "name": "Corticosteroids"
541
+ },
542
+ {
543
+ "id": "Immunosuppresants",
544
+ "name": "Immunosuppresants"
545
+ }
546
+ ]
547
+ },
548
+ {
549
+ "name": "MinorClassNdcGroup",
550
+ "repository": {
551
+ "type": "InMemory"
552
+ },
553
+ "fields": [
554
+ {
555
+ "name": "minorClassId",
556
+ "type": "MinorClass",
557
+ "label": "Minor Class"
558
+ },
559
+ {
560
+ "name": "ndcGroupId",
561
+ "type": "NdcGroup",
562
+ "label": "NdcGroup"
563
+ }
564
+ ],
565
+ "standardFields": ["id"]
566
+ },
567
+ {
568
+ "name": "NdcGroup",
569
+ "repository": {
570
+ "type": "InMemory"
571
+ },
572
+ "fields": [
573
+ {
574
+ "name": "id",
575
+ "type": "String",
576
+ "label": "NdcGroup"
577
+ },
578
+ {
579
+ "name": "ndcName",
580
+ "type": "String",
581
+ "label": "NDC name"
582
+ },
583
+ {
584
+ "name": "ndcGroupDosageFormId",
585
+ "type": "NdcGroupDosageForm",
586
+ "label": "NDCGroup dosage form"
587
+ },
588
+ {
589
+ "name": "productStatus",
590
+ "type": "ProductStatus",
591
+ "label": "ProductStatus"
592
+ },
593
+ {
594
+ "name": "productLabel",
595
+ "type": "ProductLabel",
596
+ "label": "ProductLabel"
597
+ },
598
+ {
599
+ "name": "isFdaEssentialMeds",
600
+ "type": "YesNoBlank",
601
+ "label": "Is FDA Essential Meds"
602
+ },
603
+ {
604
+ "name": "isWhoEssentialMeds",
605
+ "type": "YesNoBlank",
606
+ "label": "Is WHO Essential Meds"
607
+ },
608
+ {
609
+ "name": "hadPastShortage2y",
610
+ "type": "YesNoBlank",
611
+ "label": "Had past shortage (2y)"
612
+ },
613
+ {
614
+ "name": "hadRecall3y",
615
+ "type": "YesNoBlank",
616
+ "label": "Had recall (3y)"
617
+ },
618
+ {
619
+ "name": "type",
620
+ "type": "DmfType?",
621
+ "label": "Type"
622
+ },
623
+ {
624
+ "name": "brandOrGeneric",
625
+ "type": "String?",
626
+ "label": "Brand or Generic"
627
+ },
628
+ {
629
+ "name": "applicationNumber",
630
+ "type": "String?",
631
+ "label": "Application number"
632
+ },
633
+ {
634
+ "name": "referenceListedDrug",
635
+ "type": "ReferenceListedDrug?",
636
+ "label": "Reference listed drug?"
637
+ },
638
+ {
639
+ "name": "biologic",
640
+ "type": "YesNoBlank",
641
+ "label": "Biologic?"
642
+ }
643
+ ],
644
+ "standardFields": ["id"],
645
+ "labelField": "ndcName"
646
+ },
647
+ {
648
+ "name": "NdcGroupCountryOrigin",
649
+ "description": "Links NDC groups to their countries of origin (many-to-many).",
650
+ "repository": {
651
+ "type": "InMemory"
652
+ },
653
+ "fields": [
654
+ {
655
+ "name": "ndcGroupId",
656
+ "type": "NdcGroup",
657
+ "label": "NDC Group"
658
+ },
659
+ {
660
+ "name": "countryId",
661
+ "type": "Country",
662
+ "label": "Country"
663
+ }
664
+ ],
665
+ "standardFields": ["id"]
666
+ },
667
+ {
668
+ "name": "NdcGroupRecentShortageChange",
669
+ "description": "Contains recent shortage changes for NDC groups.",
670
+ "repository": {
671
+ "type": "InMemory"
672
+ },
673
+ "fields": [
674
+ {
675
+ "name": "ndcGroupId",
676
+ "type": "NdcGroup",
677
+ "label": "NDC Group"
678
+ },
679
+ {
680
+ "name": "title",
681
+ "type": "String",
682
+ "description": "Brief headline/description of the shortage change.",
683
+ "label": "Title"
684
+ },
685
+ {
686
+ "name": "status",
687
+ "type": "NdcGroupRecentShortageChangeStatus",
688
+ "label": "Status"
689
+ },
690
+ {
691
+ "name": "shortageType",
692
+ "type": "NdcGroupShortageType",
693
+ "label": "Shortage type"
694
+ },
695
+ {
696
+ "name": "date",
697
+ "type": "DateTime",
698
+ "label": "Date"
699
+ }
700
+ ],
701
+ "standardFields": ["id"]
702
+ },
703
+ {
704
+ "name": "NdcGroupShortage",
705
+ "description": "Flags the given NDC group as having a shortage.",
706
+ "repository": {
707
+ "type": "InMemory"
708
+ },
709
+ "fields": [
710
+ {
711
+ "name": "ndcGroupId",
712
+ "type": "NdcGroup",
713
+ "label": "NDC Group"
714
+ },
715
+ {
716
+ "name": "isCurrentShortageFda",
717
+ "type": "Boolean",
718
+ "label": "Is current shortage (FDA)?"
719
+ },
720
+ {
721
+ "name": "isCurrentShortageAshp",
722
+ "type": "Boolean",
723
+ "label": "Is current shortage (ASHP)?"
724
+ }
725
+ ],
726
+ "standardFields": ["id"]
727
+ },
728
+ {
729
+ "name": "NdcGroupShortageHistoryEntry",
730
+ "repository": {
731
+ "type": "InMemory"
732
+ },
733
+ "fields": [
734
+ {
735
+ "name": "ndcGroupId",
736
+ "type": "NdcGroup",
737
+ "label": "NDC Group"
738
+ },
739
+ {
740
+ "name": "title",
741
+ "type": "String",
742
+ "label": "Title"
743
+ },
744
+ {
745
+ "name": "status",
746
+ "type": "NdcGroupShortageHistoryStatus",
747
+ "label": "Status"
748
+ },
749
+ {
750
+ "name": "initialPostingDate",
751
+ "type": "DateTime",
752
+ "label": "Initial Posting Date"
753
+ },
754
+ {
755
+ "name": "dateOfUpdate",
756
+ "type": "DateTime",
757
+ "label": "Date of Update"
758
+ },
759
+ {
760
+ "name": "shortageDurationInDays",
761
+ "type": "Int",
762
+ "label": "Shortage Duration (Days)"
763
+ },
764
+ {
765
+ "name": "shortageType",
766
+ "type": "NdcGroupShortageType",
767
+ "label": "Shortage type"
768
+ }
769
+ ],
770
+ "standardFields": ["id"]
771
+ },
772
+ {
773
+ "name": "NdcGroupTherapeuticEquivalenceCode",
774
+ "repository": {
775
+ "type": "InMemory"
776
+ },
777
+ "fields": [
778
+ {
779
+ "name": "ndcGroupId",
780
+ "type": "NdcGroup",
781
+ "label": "NDCGroup"
782
+ },
783
+ {
784
+ "name": "therapeuticEquivalenceCodeId",
785
+ "type": "TherapeuticEquivalenceCode",
786
+ "label": "Therapeutic Equivalence Code"
787
+ }
788
+ ],
789
+ "standardFields": ["id"]
790
+ },
791
+ {
792
+ "name": "TherapeuticEquivalenceCode",
793
+ "description": "Therapeutic Equivalence Codes) are found in the FDA Orange Book. These codes indicate the therapeutic equivalence of generic drugs to their branded counterparts.",
794
+ "repository": {
795
+ "type": "InMemory"
796
+ },
797
+ "fields": [
798
+ {
799
+ "name": "name",
800
+ "type": "String",
801
+ "label": "Name"
802
+ }
803
+ ],
804
+ "standardFields": ["id"]
805
+ },
806
+ {
807
+ "name": "NdcGroupFacility",
808
+ "repository": {
809
+ "type": "InMemory"
810
+ },
811
+ "fields": [
812
+ {
813
+ "name": "ndcGroupId",
814
+ "type": "NdcGroup",
815
+ "label": "NdcGroup"
816
+ },
817
+ {
818
+ "name": "facilityId",
819
+ "type": "Facility?",
820
+ "label": "Facility"
821
+ },
822
+ {
823
+ "name": "countryId",
824
+ "type": "Country?",
825
+ "label": "Country"
826
+ },
827
+ {
828
+ "name": "mapConfidence",
829
+ "type": "MapConfidence",
830
+ "label": "MapConfidence"
831
+ },
832
+ {
833
+ "name": "type",
834
+ "type": "ProductionType",
835
+ "label": "Type"
836
+ }
837
+ ],
838
+ "standardFields": ["id"]
839
+ },
840
+ {
841
+ "name": "DrugProductNdcGroup",
842
+ "repository": {
843
+ "type": "InMemory"
844
+ },
845
+ "fields": [
846
+ {
847
+ "name": "drugProductId",
848
+ "type": "DrugProduct",
849
+ "label": "Drug product"
850
+ },
851
+ {
852
+ "name": "ndcGroupId",
853
+ "type": "NdcGroup",
854
+ "label": "NDC Group"
855
+ }
856
+ ],
857
+ "standardFields": ["id"],
858
+ "actions": {
859
+ "removeOldDrugProducts": "Remove old drug products that are not assigned to any NDC groups."
860
+ }
861
+ },
862
+ {
863
+ "name": "NdcGroupDosageForm",
864
+ "description": "A dosage form is the way a drug is delivered to a patient.",
865
+ "repository": {
866
+ "type": "InMemory"
867
+ },
868
+ "fields": [
869
+ {
870
+ "name": "dosageForm",
871
+ "type": "String",
872
+ "label": "DosageForm",
873
+ "description": "The name of the dosage form.",
874
+ "isUnique": true
875
+ }
876
+ ],
877
+ "standardFields": ["id"],
878
+ "seed": [
879
+ {
880
+ "id": "Buccal Gel",
881
+ "dosageForm": "Buccal Gel"
882
+ },
883
+ {
884
+ "id": "Inhalation Suspension",
885
+ "dosageForm": "Inhalation Suspension"
886
+ },
887
+ {
888
+ "id": "Oral Strip",
889
+ "dosageForm": "Oral Strip"
890
+ }
891
+ ]
892
+ },
893
+ {
894
+ "name": "NdcCode",
895
+ "repository": {
896
+ "type": "InMemory"
897
+ },
898
+ "fields": [
899
+ {
900
+ "name": "ndcCode",
901
+ "type": "String",
902
+ "label": "NDC code",
903
+ "description": "The NDC code of a drug.",
904
+ "isUnique": true
905
+ },
906
+ {
907
+ "name": "name",
908
+ "type": "String",
909
+ "label": "Name",
910
+ "description": "The first name used for the NDC code. Note: NDC codes can have multiple names. These are available in NdcCodeName."
911
+ },
912
+ {
913
+ "name": "ndcGroupId",
914
+ "type": "NdcGroup",
915
+ "label": "NDC Group"
916
+ }
917
+ ],
918
+ "standardFields": ["id"]
919
+ },
920
+ {
921
+ "name": "NdcCodeName",
922
+ "description": "An NDC code can have multiple names.",
923
+ "repository": {
924
+ "type": "InMemory"
925
+ },
926
+ "fields": [
927
+ {
928
+ "name": "ndcCodeId",
929
+ "type": "NdcCode",
930
+ "label": "NDC Code"
931
+ },
932
+ {
933
+ "name": "name",
934
+ "type": "String",
935
+ "label": "Name"
936
+ }
937
+ ],
938
+ "standardFields": ["id"]
939
+ },
940
+ {
941
+ "name": "NdcGroupLabeler",
942
+ "repository": {
943
+ "type": "InMemory"
944
+ },
945
+ "fields": [
946
+ {
947
+ "name": "ndcGroupId",
948
+ "type": "NdcGroup",
949
+ "label": "NDC Group"
950
+ },
951
+ {
952
+ "name": "labelerId",
953
+ "type": "Labeler",
954
+ "label": "Labeler"
955
+ }
956
+ ],
957
+ "standardFields": ["id"]
958
+ },
959
+ {
960
+ "name": "Labeler",
961
+ "description": "A labeler is a company that takes FDFs and labels them for pharmacy use and resell.",
962
+ "repository": {
963
+ "type": "InMemory"
964
+ },
965
+ "fields": [
966
+ {
967
+ "name": "name",
968
+ "type": "String",
969
+ "label": "labelerName"
970
+ },
971
+ {
972
+ "name": "duns",
973
+ "type": "String?",
974
+ "label": "Key/D-U-N-S",
975
+ "description": "The labelers DUNS number"
976
+ }
977
+ ],
978
+ "standardFields": ["id"]
979
+ },
980
+ {
981
+ "name": "Facility",
982
+ "description": "A facility is a physical location where a company produces a substance.",
983
+ "repository": {
984
+ "type": "InMemory"
985
+ },
986
+ "fields": [
987
+ {
988
+ "name": "isMissingPlaceholder",
989
+ "type": "Boolean",
990
+ "label": "IsMissingPlaceholder",
991
+ "description": "For some drug products/NDC groups, we do have marketshare/volume data, but no facility data. For this we create one facility as a placeholder. This flag is used to identify this facility."
992
+ },
993
+ {
994
+ "name": "companyId",
995
+ "type": "Company",
996
+ "label": "Company",
997
+ "description": "The company that owns the facility."
998
+ },
999
+ {
1000
+ "name": "state",
1001
+ "type": "String?",
1002
+ "label": "State"
1003
+ },
1004
+ {
1005
+ "name": "city",
1006
+ "type": "String?",
1007
+ "label": "City"
1008
+ },
1009
+ {
1010
+ "name": "latitude",
1011
+ "type": "Float?",
1012
+ "label": "Latitude",
1013
+ "description": "The geographic latitude of the facility."
1014
+ },
1015
+ {
1016
+ "name": "longitude",
1017
+ "type": "Float?",
1018
+ "label": "Longitude",
1019
+ "description": "The geographic longitude of the facility."
1020
+ },
1021
+ {
1022
+ "name": "countryId",
1023
+ "type": "Country?",
1024
+ "label": "Country"
1025
+ },
1026
+ {
1027
+ "name": "producesFdf",
1028
+ "type": "Boolean",
1029
+ "label": "Produces FDF?",
1030
+ "description": "True in case facility produces FDFs."
1031
+ },
1032
+ {
1033
+ "name": "producesApi",
1034
+ "type": "Boolean",
1035
+ "label": "Produces API?",
1036
+ "description": "True in case facility produces APIs."
1037
+ },
1038
+ {
1039
+ "name": "oaiProportion",
1040
+ "type": "Float?",
1041
+ "label": "OAI proportion"
1042
+ },
1043
+ {
1044
+ "name": "feiNumber",
1045
+ "type": "String?",
1046
+ "label": "FEI number"
1047
+ }
1048
+ ],
1049
+ "standardFields": ["id"]
1050
+ },
1051
+ {
1052
+ "name": "Company",
1053
+ "repository": {
1054
+ "type": "InMemory"
1055
+ },
1056
+ "fields": [
1057
+ {
1058
+ "name": "parentCompanyId",
1059
+ "type": "ParentCompany?",
1060
+ "label": "Parent company",
1061
+ "description": "The parent company of the company."
1062
+ },
1063
+ {
1064
+ "name": "name",
1065
+ "type": "String",
1066
+ "label": "Name",
1067
+ "isUnique": true
1068
+ },
1069
+ {
1070
+ "name": "isMissingPlaceholder",
1071
+ "type": "Boolean",
1072
+ "label": "Is placeholder for missing entries"
1073
+ }
1074
+ ],
1075
+ "standardFields": ["id"]
1076
+ },
1077
+ {
1078
+ "name": "ParentCompany",
1079
+ "standardFields": ["id"],
1080
+ "repository": {
1081
+ "type": "InMemory"
1082
+ },
1083
+ "fields": [
1084
+ {
1085
+ "name": "name",
1086
+ "type": "String",
1087
+ "label": "Name"
1088
+ }
1089
+ ]
1090
+ },
1091
+ {
1092
+ "name": "Country",
1093
+ "repository": {
1094
+ "type": "InMemory"
1095
+ },
1096
+ "fields": [
1097
+ {
1098
+ "name": "name",
1099
+ "type": "String",
1100
+ "label": "ISO Code",
1101
+ "isUnique": true
1102
+ },
1103
+ {
1104
+ "name": "civilUnrest",
1105
+ "type": "Int?",
1106
+ "label": "Civil unrest score"
1107
+ },
1108
+ {
1109
+ "name": "climaticRisk",
1110
+ "type": "Int?",
1111
+ "label": "Climatic risk score"
1112
+ }
1113
+ ],
1114
+ "standardFields": ["id"]
1115
+ },
1116
+ {
1117
+ "name": "Fda483",
1118
+ "description": "FDA 483 inspection observations.",
1119
+ "repository": {
1120
+ "type": "InMemory"
1121
+ },
1122
+ "fields": [
1123
+ {
1124
+ "name": "facilityId",
1125
+ "type": "Facility",
1126
+ "label": "Facility"
1127
+ },
1128
+ {
1129
+ "name": "resultId",
1130
+ "type": "Int?",
1131
+ "label": "FDA Result ID",
1132
+ "description": "Id in FDA database, optional"
1133
+ },
1134
+ {
1135
+ "name": "newsDescription",
1136
+ "type": "String?",
1137
+ "label": "Headline from news article"
1138
+ },
1139
+ {
1140
+ "name": "actionDate",
1141
+ "type": "DateTime",
1142
+ "label": "Action date",
1143
+ "description": "Date 483 was issued"
1144
+ },
1145
+ {
1146
+ "name": "mostRecentDate",
1147
+ "type": "DateTime?",
1148
+ "label": "Most recent date",
1149
+ "description": "Date of the most recent update."
1150
+ },
1151
+ {
1152
+ "name": "sourceUrl",
1153
+ "type": "String?",
1154
+ "label": "Source URL",
1155
+ "description": "The URL to the news items"
1156
+ }
1157
+ ],
1158
+ "standardFields": ["id"]
1159
+ },
1160
+ {
1161
+ "name": "NewsItem",
1162
+ "description": "News Item information.",
1163
+ "repository": {
1164
+ "type": "InMemory"
1165
+ },
1166
+ "fields": [
1167
+ {
1168
+ "name": "date",
1169
+ "type": "DateTime",
1170
+ "label": "Date"
1171
+ },
1172
+ {
1173
+ "name": "content",
1174
+ "type": "String",
1175
+ "label": "News content"
1176
+ },
1177
+ {
1178
+ "name": "type",
1179
+ "type": "String",
1180
+ "label": "Type",
1181
+ "description": "The textual description of the type of news item."
1182
+ },
1183
+ {
1184
+ "name": "sourceText",
1185
+ "type": "String",
1186
+ "label": "Source text"
1187
+ },
1188
+ {
1189
+ "name": "sourceUrl",
1190
+ "type": "String",
1191
+ "label": "Source URL"
1192
+ }
1193
+ ],
1194
+ "standardFields": ["id"]
1195
+ },
1196
+ {
1197
+ "name": "NewsFacility",
1198
+ "repository": {
1199
+ "type": "InMemory"
1200
+ },
1201
+ "fields": [
1202
+ {
1203
+ "name": "newsId",
1204
+ "type": "NewsItem",
1205
+ "label": "News"
1206
+ },
1207
+ {
1208
+ "name": "facilityId",
1209
+ "type": "Facility",
1210
+ "label": "Facility"
1211
+ }
1212
+ ],
1213
+ "standardFields": ["id"]
1214
+ },
1215
+ {
1216
+ "name": "InspectionResult",
1217
+ "description": "Inspection Result information.",
1218
+ "repository": {
1219
+ "type": "InMemory"
1220
+ },
1221
+ "fields": [
1222
+ {
1223
+ "name": "result",
1224
+ "type": "InspectionResultType",
1225
+ "label": "Result",
1226
+ "description": "The result of the inspection."
1227
+ },
1228
+ {
1229
+ "name": "classificationDate",
1230
+ "type": "DateTime",
1231
+ "label": "Classification date",
1232
+ "description": "Date of the initial classification."
1233
+ },
1234
+ {
1235
+ "name": "mostRecentDate",
1236
+ "type": "DateTime",
1237
+ "label": "Most recent date",
1238
+ "description": "Date of the most recent inspection (in case of a follow-up inspection)."
1239
+ },
1240
+ {
1241
+ "name": "citation",
1242
+ "type": "String",
1243
+ "label": "Citation",
1244
+ "description": "The result of the inspection."
1245
+ }
1246
+ ],
1247
+ "standardFields": ["id"]
1248
+ },
1249
+ {
1250
+ "name": "InspectionResultFacility",
1251
+ "description": "Inspection Result for a facility.",
1252
+ "repository": {
1253
+ "type": "InMemory"
1254
+ },
1255
+ "fields": [
1256
+ {
1257
+ "name": "result",
1258
+ "type": "InspectionResultType",
1259
+ "label": "Result",
1260
+ "description": "The result of the inspection."
1261
+ },
1262
+ {
1263
+ "name": "classificationDate",
1264
+ "type": "DateTime",
1265
+ "label": "Classification date",
1266
+ "description": "Date of the initial classification."
1267
+ },
1268
+ {
1269
+ "name": "mostRecentDate",
1270
+ "type": "DateTime",
1271
+ "label": "MostRecentDate",
1272
+ "description": "Date of the most recent inspection (in case of a follow-up inspection)."
1273
+ },
1274
+ {
1275
+ "name": "citation",
1276
+ "type": "String",
1277
+ "label": "Citation",
1278
+ "description": "The result of the inspection."
1279
+ },
1280
+ {
1281
+ "name": "inspectionResultId",
1282
+ "type": "InspectionResult",
1283
+ "label": "Inspection result"
1284
+ },
1285
+ {
1286
+ "name": "facilityId",
1287
+ "type": "Facility",
1288
+ "label": "Facility"
1289
+ }
1290
+ ],
1291
+ "standardFields": ["id"]
1292
+ },
1293
+ {
1294
+ "name": "WarningLetterResult",
1295
+ "description": "Warning Letter Result information.",
1296
+ "repository": {
1297
+ "type": "InMemory"
1298
+ },
1299
+ "fields": [
1300
+ {
1301
+ "name": "facilityId",
1302
+ "type": "Facility",
1303
+ "label": "Facility"
1304
+ },
1305
+ {
1306
+ "name": "actionDate",
1307
+ "type": "DateTime",
1308
+ "label": "ActionDate",
1309
+ "description": "The date that the warning letter was issued."
1310
+ },
1311
+ {
1312
+ "name": "source",
1313
+ "type": "WarningLetterSource",
1314
+ "label": "Source"
1315
+ }
1316
+ ],
1317
+ "standardFields": ["id"]
1318
+ },
1319
+ {
1320
+ "name": "DrugProduct",
1321
+ "description": "Drug Product information.",
1322
+ "repository": {
1323
+ "type": "InMemory"
1324
+ },
1325
+ "fields": [
1326
+ {
1327
+ "name": "name",
1328
+ "type": "String",
1329
+ "label": "DrugProduct name"
1330
+ },
1331
+ {
1332
+ "name": "dosageForm",
1333
+ "type": "String",
1334
+ "label": "Dosage form",
1335
+ "description": "The dosage form of the drug product."
1336
+ },
1337
+ {
1338
+ "name": "isActive",
1339
+ "type": "Boolean",
1340
+ "description": "Indicates whether the drug product has any active NDCGroup.",
1341
+ "label": "Is active?"
1342
+ }
1343
+ ],
1344
+ "standardFields": ["id"],
1345
+ "seed": [
1346
+ {
1347
+ "id": "drugProduct1",
1348
+ "name": "DrugProduct 1",
1349
+ "isActive": true,
1350
+ "dosageForm": "Device"
1351
+ },
1352
+ {
1353
+ "id": "drugProduct2",
1354
+ "name": "DrugProduct 2",
1355
+ "isActive": true,
1356
+ "dosageForm": "Gc"
1357
+ },
1358
+ {
1359
+ "id": "drugProduct3",
1360
+ "name": "DrugProduct 3",
1361
+ "isActive": true,
1362
+ "dosageForm": "Inhalation"
1363
+ },
1364
+ {
1365
+ "id": "drugProduct4",
1366
+ "name": "DrugProduct 4",
1367
+ "isActive": true,
1368
+ "dosageForm": "Injectable"
1369
+ },
1370
+ {
1371
+ "id": "drugProduct5",
1372
+ "name": "DrugProduct 5",
1373
+ "isActive": true,
1374
+ "dosageForm": "Mucosal"
1375
+ },
1376
+ {
1377
+ "id": "drugProduct6",
1378
+ "name": "DrugProduct 6",
1379
+ "isActive": true,
1380
+ "dosageForm": "Oral Liquid"
1381
+ },
1382
+ {
1383
+ "id": "drugProduct7",
1384
+ "name": "DrugProduct 7",
1385
+ "isActive": true,
1386
+ "dosageForm": "Oral Solid"
1387
+ },
1388
+ {
1389
+ "id": "drugProduct8",
1390
+ "name": "DrugProduct 8",
1391
+ "isActive": true,
1392
+ "dosageForm": "Topical"
1393
+ }
1394
+ ],
1395
+ "actions": {
1396
+ "updateActiveStatus": "Update the active status of a drug product based on its NDC groups."
1397
+ }
1398
+ },
1399
+ {
1400
+ "name": "DrugProductRiskChange",
1401
+ "description": "Change in drug product risk level since last period.",
1402
+ "repository": {
1403
+ "type": "InMemory"
1404
+ },
1405
+ "fields": [
1406
+ {
1407
+ "name": "drugProductId",
1408
+ "type": "DrugProduct",
1409
+ "label": "DrugProduct"
1410
+ },
1411
+ {
1412
+ "name": "riskScoreChange",
1413
+ "type": "Float",
1414
+ "label": "Risk score change",
1415
+ "description": "The change in risk score since the last period."
1416
+ },
1417
+ {
1418
+ "name": "date",
1419
+ "type": "DateTime",
1420
+ "label": "Date"
1421
+ }
1422
+ ],
1423
+ "standardFields": ["id"]
1424
+ },
1425
+ {
1426
+ "name": "DrugProductPredictionHistoryEntry",
1427
+ "description": "Contains prediction history for drug products from 12 months ago - and current shortage status.",
1428
+ "repository": {
1429
+ "type": "InMemory"
1430
+ },
1431
+ "fields": [
1432
+ {
1433
+ "name": "drugProductId",
1434
+ "type": "DrugProduct",
1435
+ "label": "DrugProduct"
1436
+ },
1437
+ {
1438
+ "name": "riskScore12m",
1439
+ "type": "Float",
1440
+ "label": "Risk score 12 months ago"
1441
+ },
1442
+ {
1443
+ "name": "isCurrentShortage",
1444
+ "type": "Boolean",
1445
+ "label": "Is current shortage?"
1446
+ }
1447
+ ],
1448
+ "standardFields": ["id"]
1449
+ },
1450
+ {
1451
+ "name": "DrugProductRisk",
1452
+ "description": "Drug Product Risk information.",
1453
+ "repository": {
1454
+ "type": "InMemory"
1455
+ },
1456
+ "fields": [
1457
+ {
1458
+ "name": "drugProductId",
1459
+ "type": "DrugProduct",
1460
+ "label": "DrugProduct"
1461
+ },
1462
+ {
1463
+ "name": "isCurrentShortage",
1464
+ "type": "Boolean",
1465
+ "label": "Is current shortage?",
1466
+ "description": "Is drug product currently in shortage."
1467
+ },
1468
+ {
1469
+ "name": "shortageHistory",
1470
+ "type": "Float",
1471
+ "label": "Shortage history",
1472
+ "description": "The score between 0 and 1 whether the drug product had a shortage history."
1473
+ },
1474
+ {
1475
+ "name": "geographicConcentration",
1476
+ "type": "Float",
1477
+ "label": "GeographicConcentration",
1478
+ "description": "The score between 0 and 1 of the drug product's geographic concentration."
1479
+ },
1480
+ {
1481
+ "name": "manufacturingComplexity",
1482
+ "type": "Float",
1483
+ "label": "Manufacturing complexity",
1484
+ "description": "The score between 0 and 1 of the drug product's manufacturing complexity."
1485
+ },
1486
+ {
1487
+ "name": "marketEconomics",
1488
+ "type": "Float",
1489
+ "label": "Market economics",
1490
+ "description": "The market economics of the drug product."
1491
+ },
1492
+ {
1493
+ "name": "quality",
1494
+ "type": "Float",
1495
+ "label": "Quality",
1496
+ "description": "The quality of the drug product."
1497
+ },
1498
+ {
1499
+ "name": "periodMonthSinceEpoch",
1500
+ "type": "Int",
1501
+ "label": "Months since launch",
1502
+ "description": "The number of months since an epoch of this risk evaluation."
1503
+ },
1504
+ {
1505
+ "name": "timeframe",
1506
+ "type": "DrugProductRiskTimeframe",
1507
+ "label": "Timeframe"
1508
+ }
1509
+ ],
1510
+ "standardFields": ["id"]
1511
+ },
1512
+ {
1513
+ "name": "DrugProductLabelerRisk",
1514
+ "description": "Risk information for labelers of drug products",
1515
+ "repository": {
1516
+ "type": "InMemory"
1517
+ },
1518
+ "fields": [
1519
+ {
1520
+ "name": "drugProductId",
1521
+ "type": "DrugProduct",
1522
+ "label": "DrugProduct"
1523
+ },
1524
+ {
1525
+ "name": "labelerId",
1526
+ "type": "Labeler",
1527
+ "label": "Labeler"
1528
+ },
1529
+ {
1530
+ "name": "isCurrentShortage",
1531
+ "type": "Boolean",
1532
+ "label": "Is current shortage?",
1533
+ "description": "Is drug product currently in shortage."
1534
+ },
1535
+ {
1536
+ "name": "shortageHistory",
1537
+ "type": "Float",
1538
+ "label": "Shortage history",
1539
+ "description": "The score between 0 and 1 whether the drug product had a shortage history."
1540
+ },
1541
+ {
1542
+ "name": "geographicConcentration",
1543
+ "type": "Float",
1544
+ "label": "GeographicConcentration",
1545
+ "description": "The score between 0 and 1 of the drug product's geographic concentration."
1546
+ },
1547
+ {
1548
+ "name": "manufacturingComplexity",
1549
+ "type": "Float",
1550
+ "label": "Manufacturing complexity",
1551
+ "description": "The score between 0 and 1 of the drug product's manufacturing complexity."
1552
+ },
1553
+ {
1554
+ "name": "marketEconomics",
1555
+ "type": "Float",
1556
+ "label": "Market economics",
1557
+ "description": "The market economics of the drug product."
1558
+ },
1559
+ {
1560
+ "name": "quality",
1561
+ "type": "Float",
1562
+ "label": "Quality",
1563
+ "description": "The quality of the drug product."
1564
+ },
1565
+ {
1566
+ "name": "periodMonthSinceEpoch",
1567
+ "type": "Int",
1568
+ "label": "Months since launch",
1569
+ "description": "The number of months since an epoch of this risk evaluation."
1570
+ },
1571
+ {
1572
+ "name": "timeframe",
1573
+ "type": "DrugProductRiskTimeframe",
1574
+ "label": "Timeframe"
1575
+ }
1576
+ ],
1577
+ "standardFields": ["id"]
1578
+ },
1579
+ {
1580
+ "name": "DrugProductTherapeuticClass",
1581
+ "description": "Therapeutic class of a drug product.",
1582
+ "repository": {
1583
+ "type": "InMemory"
1584
+ },
1585
+ "fields": [
1586
+ {
1587
+ "name": "drugProductId",
1588
+ "type": "DrugProduct",
1589
+ "label": "DrugProduct"
1590
+ },
1591
+ {
1592
+ "name": "therapeuticClassId",
1593
+ "type": "TherapeuticClass",
1594
+ "label": "TherapeuticClass"
1595
+ }
1596
+ ],
1597
+ "standardFields": ["id"]
1598
+ },
1599
+ {
1600
+ "name": "TherapeuticClass",
1601
+ "repository": {
1602
+ "type": "InMemory"
1603
+ },
1604
+ "fields": [
1605
+ {
1606
+ "name": "name",
1607
+ "type": "String",
1608
+ "label": "Name",
1609
+ "isUnique": true
1610
+ }
1611
+ ],
1612
+ "standardFields": ["id"],
1613
+ "seed": [
1614
+ {
1615
+ "id": "Antivirals For Systemic Use",
1616
+ "name": "Antivirals For Systemic Use"
1617
+ },
1618
+ {
1619
+ "id": "Ophthalmologicals",
1620
+ "name": "Ophthalmologicals"
1621
+ },
1622
+ {
1623
+ "id": "Psychoanaleptics",
1624
+ "name": "Psychoanaleptics"
1625
+ },
1626
+ {
1627
+ "id": "Psycholeptics",
1628
+ "name": "Psycholeptics"
1629
+ }
1630
+ ]
1631
+ },
1632
+ {
1633
+ "name": "DrugProductMarketShare",
1634
+ "description": "Drug Product Market Share information.",
1635
+ "repository": {
1636
+ "type": "InMemory"
1637
+ },
1638
+ "fields": [
1639
+ {
1640
+ "name": "drugProductId",
1641
+ "type": "DrugProduct",
1642
+ "label": "DrugProduct"
1643
+ },
1644
+ {
1645
+ "name": "facilityId",
1646
+ "type": "Facility?",
1647
+ "label": "Facility"
1648
+ },
1649
+ {
1650
+ "name": "ndcGroupId",
1651
+ "type": "NdcGroup",
1652
+ "label": "NDC Group"
1653
+ },
1654
+ {
1655
+ "name": "volume",
1656
+ "type": "Float?",
1657
+ "label": "Volume"
1658
+ },
1659
+ {
1660
+ "name": "marketShare",
1661
+ "type": "Float?",
1662
+ "label": "Market share"
1663
+ },
1664
+ {
1665
+ "name": "lastYearMarketShare",
1666
+ "type": "Float?",
1667
+ "label": "Last year market share"
1668
+ },
1669
+ {
1670
+ "name": "lastTwoYearMarketShare",
1671
+ "type": "Float?",
1672
+ "label": "Last two year market share"
1673
+ },
1674
+ {
1675
+ "name": "isUnknown",
1676
+ "type": "Boolean",
1677
+ "label": "Is unknown?"
1678
+ },
1679
+ {
1680
+ "name": "countryId",
1681
+ "type": "Country?",
1682
+ "label": "Country"
1683
+ }
1684
+ ],
1685
+ "standardFields": ["id"]
1686
+ },
1687
+ {
1688
+ "name": "ApiMolecule",
1689
+ "description": "A molecule is a chemical compound that is used in the production of a drug product.",
1690
+ "repository": {
1691
+ "type": "InMemory"
1692
+ },
1693
+ "fields": [
1694
+ {
1695
+ "name": "name",
1696
+ "type": "String",
1697
+ "label": "Name",
1698
+ "isUnique": true
1699
+ },
1700
+ {
1701
+ "name": "totalVolume",
1702
+ "type": "Float?",
1703
+ "label": "Total volume"
1704
+ }
1705
+ ],
1706
+ "standardFields": ["id"],
1707
+ "seed": [
1708
+ {
1709
+ "id": "apiMolecule1",
1710
+ "name": "10 Dabiii"
1711
+ },
1712
+ {
1713
+ "id": "apiMolecule2",
1714
+ "name": "Alvimopan"
1715
+ },
1716
+ {
1717
+ "id": "apiMolecule3",
1718
+ "name": "Busulfan"
1719
+ }
1720
+ ]
1721
+ },
1722
+ {
1723
+ "name": "ApiMoleculeNdcGroupFacility",
1724
+ "description": "A molecule can have multiple NDC groups.",
1725
+ "repository": {
1726
+ "type": "InMemory"
1727
+ },
1728
+ "fields": [
1729
+ {
1730
+ "name": "apiMoleculeId",
1731
+ "type": "ApiMolecule",
1732
+ "label": "API Molecule"
1733
+ },
1734
+ {
1735
+ "name": "ndcGroupId",
1736
+ "type": "NdcGroup",
1737
+ "label": "NDC Group"
1738
+ },
1739
+ {
1740
+ "name": "facilityId",
1741
+ "type": "Facility?",
1742
+ "label": "Facility",
1743
+ "description": "The facility that produces the API molecule.\n\nNote: This field is nullable as we sometimes do not have the information - but still want to keep track which API molecule is used in which NDC group."
1744
+ },
1745
+ {
1746
+ "name": "countryId",
1747
+ "type": "Country?",
1748
+ "label": "Country",
1749
+ "description": "The country where the API molecule is produced."
1750
+ }
1751
+ ],
1752
+ "standardFields": ["id"]
1753
+ },
1754
+ {
1755
+ "name": "ApiMarketShare",
1756
+ "description": "Market share information for an API molecule.",
1757
+ "repository": {
1758
+ "type": "InMemory"
1759
+ },
1760
+ "fields": [
1761
+ {
1762
+ "name": "apiMoleculeId",
1763
+ "type": "ApiMolecule",
1764
+ "label": "API Molecule"
1765
+ },
1766
+ {
1767
+ "name": "facilityId",
1768
+ "type": "Facility?",
1769
+ "label": "Facility"
1770
+ },
1771
+ {
1772
+ "name": "companyId",
1773
+ "type": "Company?",
1774
+ "label": "Company"
1775
+ },
1776
+ {
1777
+ "name": "countryId",
1778
+ "type": "Country?",
1779
+ "label": "Country"
1780
+ },
1781
+ {
1782
+ "name": "mapConfidence",
1783
+ "type": "MapConfidence?",
1784
+ "label": "Map confidence"
1785
+ },
1786
+ {
1787
+ "name": "volume",
1788
+ "type": "Float?",
1789
+ "label": "Volume"
1790
+ },
1791
+ {
1792
+ "name": "marketShare",
1793
+ "type": "Float?",
1794
+ "label": "Market share"
1795
+ },
1796
+ {
1797
+ "name": "maxMarketShare",
1798
+ "type": "Float?",
1799
+ "label": "Max market share"
1800
+ },
1801
+ {
1802
+ "name": "isUnknown",
1803
+ "type": "Boolean",
1804
+ "label": "Is unknown?"
1805
+ },
1806
+ {
1807
+ "name": "isApiInShortage",
1808
+ "type": "Boolean",
1809
+ "label": "Is API in shortage?"
1810
+ },
1811
+ {
1812
+ "name": "isNdcInshortageByApiShortage",
1813
+ "type": "Boolean",
1814
+ "label": "Is NDC in shortage by API shortage?"
1815
+ },
1816
+ {
1817
+ "name": "companyName",
1818
+ "type": "String?",
1819
+ "label": "Company Name"
1820
+ }
1821
+ ],
1822
+ "standardFields": ["id"]
1823
+ },
1824
+ {
1825
+ "name": "DmfRecord",
1826
+ "repository": {
1827
+ "type": "InMemory"
1828
+ },
1829
+ "fields": [
1830
+ {
1831
+ "name": "dmfName",
1832
+ "type": "String",
1833
+ "label": "DMF name"
1834
+ },
1835
+ {
1836
+ "name": "type",
1837
+ "type": "DmfType",
1838
+ "label": "Type"
1839
+ },
1840
+ {
1841
+ "name": "apiMoleculeId",
1842
+ "type": "ApiMolecule?",
1843
+ "label": "API Molecule",
1844
+ "description": "Linked API molecule - only for DmfType = API"
1845
+ },
1846
+ {
1847
+ "name": "drugProductId",
1848
+ "type": "DrugProduct?",
1849
+ "label": "DrugProduct",
1850
+ "description": "Linked Drug Product - only for DmfType = FDF"
1851
+ },
1852
+ {
1853
+ "name": "dosageForm",
1854
+ "type": "String",
1855
+ "label": "Dosage form"
1856
+ },
1857
+ {
1858
+ "name": "isFdaEssentialMeds",
1859
+ "type": "YesNoBlank",
1860
+ "label": "Is FDA Essential Meds?"
1861
+ },
1862
+ {
1863
+ "name": "isWhoEssentialMeds",
1864
+ "type": "YesNoBlank",
1865
+ "label": "Is WHO Essential Meds?"
1866
+ },
1867
+ {
1868
+ "name": "recordConfidence",
1869
+ "type": "RecordConfidence",
1870
+ "label": "Record confidence"
1871
+ },
1872
+ {
1873
+ "name": "facilityId",
1874
+ "type": "Facility",
1875
+ "label": "Facility"
1876
+ }
1877
+ ],
1878
+ "standardFields": ["id"],
1879
+ "labelField": "dmfName"
1880
+ },
1881
+ {
1882
+ "name": "ProductRecall",
1883
+ "description": "A product recall is issued by the FDA when a product is found to be unsafe or defective.",
1884
+ "repository": {
1885
+ "type": "InMemory"
1886
+ },
1887
+ "fields": [
1888
+ {
1889
+ "name": "initiationDate",
1890
+ "type": "DateTime",
1891
+ "label": "Initiation date"
1892
+ },
1893
+ {
1894
+ "name": "terminationDate",
1895
+ "type": "DateTime?",
1896
+ "label": "Termination date"
1897
+ },
1898
+ {
1899
+ "name": "status",
1900
+ "type": "ProductRecallStatus",
1901
+ "label": "Status"
1902
+ },
1903
+ {
1904
+ "name": "reasonRecall",
1905
+ "type": "String",
1906
+ "label": "Reason for recall"
1907
+ }
1908
+ ],
1909
+ "standardFields": ["id"]
1910
+ },
1911
+ {
1912
+ "name": "ProductRecallFacilityNdcGroup",
1913
+ "repository": {
1914
+ "type": "InMemory"
1915
+ },
1916
+ "fields": [
1917
+ {
1918
+ "name": "productRecallId",
1919
+ "type": "ProductRecall",
1920
+ "label": "ProductRecall"
1921
+ },
1922
+ {
1923
+ "name": "facilityId",
1924
+ "type": "Facility?",
1925
+ "label": "Facility"
1926
+ },
1927
+ {
1928
+ "name": "ndcGroupId",
1929
+ "type": "NdcGroup?",
1930
+ "label": "NDC Group"
1931
+ },
1932
+ {
1933
+ "name": "companyId",
1934
+ "type": "Company?",
1935
+ "label": "Company"
1936
+ },
1937
+ {
1938
+ "name": "countryId",
1939
+ "type": "Country?",
1940
+ "label": "Country"
1941
+ }
1942
+ ],
1943
+ "standardFields": ["id"]
1944
+ },
1945
+ {
1946
+ "name": "PublishedReport",
1947
+ "repository": {
1948
+ "type": "InMemory"
1949
+ },
1950
+ "fields": [
1951
+ {
1952
+ "name": "title",
1953
+ "type": "String",
1954
+ "label": "Title"
1955
+ },
1956
+ {
1957
+ "name": "url",
1958
+ "type": "String",
1959
+ "label": "URL"
1960
+ },
1961
+ {
1962
+ "name": "description",
1963
+ "type": "String?",
1964
+ "label": "Description"
1965
+ },
1966
+ {
1967
+ "name": "releaseDate",
1968
+ "type": "DateTime",
1969
+ "label": "Release"
1970
+ }
1971
+ ],
1972
+ "standardFields": ["id"]
1973
+ },
1974
+ {
1975
+ "name": "DrugProductLabelerMarketShare",
1976
+ "description": "Market share information for drug product labelers.",
1977
+ "repository": {
1978
+ "type": "InMemory"
1979
+ },
1980
+ "fields": [
1981
+ {
1982
+ "name": "drugProductId",
1983
+ "type": "DrugProduct",
1984
+ "label": "DrugProduct"
1985
+ },
1986
+ {
1987
+ "name": "labelerId",
1988
+ "type": "Labeler",
1989
+ "label": "Labeler"
1990
+ },
1991
+ {
1992
+ "name": "volume",
1993
+ "type": "Float?",
1994
+ "label": "Volume"
1995
+ },
1996
+ {
1997
+ "name": "totalVolume",
1998
+ "type": "Float?",
1999
+ "label": "Total volume"
2000
+ }
2001
+ ],
2002
+ "standardFields": ["id"]
2003
+ },
2004
+ {
2005
+ "schema": "KSM",
2006
+ "name": "Api",
2007
+ "description": "The KSM API definition. Imported from df_api.csv",
2008
+ "repository": {
2009
+ "type": "InMemory"
2010
+ },
2011
+ "standardFields": ["id", "name"],
2012
+ "fields": [
2013
+ {
2014
+ "name": "unii",
2015
+ "type": "String?",
2016
+ "label": "UNII",
2017
+ "description": "UNII: Unique Ingredient Identifier. A unique identifier for substances in the FDA Substance Registration System."
2018
+ },
2019
+ {
2020
+ "name": "formName",
2021
+ "type": "String?",
2022
+ "label": "Form Name",
2023
+ "description": "The name of the form of the substance."
2024
+ },
2025
+ {
2026
+ "name": "formUnii",
2027
+ "type": "String?",
2028
+ "label": "Form UNII",
2029
+ "description": "UNII for the form of the substance."
2030
+ }
2031
+ ]
2032
+ },
2033
+ {
2034
+ "schema": "KSM",
2035
+ "name": "ApiMoleculeApi",
2036
+ "description": "Mapping between KSM API and MSM ApiMolecule. Imported from msm_bridge_df_api.csv",
2037
+ "repository": {
2038
+ "type": "InMemory"
2039
+ },
2040
+ "standardFields": ["id"],
2041
+ "fields": [
2042
+ {
2043
+ "name": "apiId",
2044
+ "type": "Api",
2045
+ "label": "API"
2046
+ },
2047
+ {
2048
+ "name": "apiMoleculeId",
2049
+ "type": "ApiMolecule",
2050
+ "label": "API Molecule"
2051
+ }
2052
+ ]
2053
+ },
2054
+ {
2055
+ "schema": "KSM",
2056
+ "name": "Ksm",
2057
+ "description": "Key Starting Material (KSM) information. Imported from df_ksm.csv",
2058
+ "repository": {
2059
+ "type": "InMemory"
2060
+ },
2061
+ "standardFields": ["id", "name"],
2062
+ "fields": [
2063
+ {
2064
+ "name": "cas",
2065
+ "description": "CAS number: Chemical Abstracts Service Registry Number",
2066
+ "type": "String?"
2067
+ },
2068
+ {
2069
+ "name": "commerciallyAvailable",
2070
+ "type": "Boolean",
2071
+ "label": "Commercially available",
2072
+ "description": "Indicates whether the KSM is commercially available."
2073
+ },
2074
+ {
2075
+ "name": "ksmType",
2076
+ "type": "String?",
2077
+ "label": "Type"
2078
+ },
2079
+ {
2080
+ "name": "usGlobalImportShare",
2081
+ "type": "Float?",
2082
+ "label": "US Visible Imports",
2083
+ "description": "Share of global trade volume imported into the USA"
2084
+ },
2085
+ {
2086
+ "name": "usImportExportStatus",
2087
+ "type": "KsmImportExportStatus?",
2088
+ "label": "Availability in USA",
2089
+ "description": "Indicates whether the KSM is imported/exported to/from the USA."
2090
+ },
2091
+ {
2092
+ "name": "numberOfTopSupplyingCountries",
2093
+ "type": "Int?",
2094
+ "label": "Top Supplying Countries",
2095
+ "description": "Number of countries that together account for ~50% of global trade volume"
2096
+ }
2097
+ ]
2098
+ },
2099
+ {
2100
+ "schema": "KSM",
2101
+ "name": "KsmExporterCountry",
2102
+ "description": "Top exporting countries (& ranks) by share of global trade (not limited to USA)",
2103
+ "repository": {
2104
+ "type": "InMemory"
2105
+ },
2106
+ "standardFields": ["id"],
2107
+ "fields": [
2108
+ {
2109
+ "name": "ksmId",
2110
+ "type": "Ksm",
2111
+ "label": "KSM"
2112
+ },
2113
+ {
2114
+ "name": "countryId",
2115
+ "type": "Country",
2116
+ "label": "Country"
2117
+ },
2118
+ {
2119
+ "name": "rank",
2120
+ "type": "Int",
2121
+ "label": "Rank",
2122
+ "description": "Rank of the country in terms of export volume for the KSM."
2123
+ }
2124
+ ]
2125
+ },
2126
+ {
2127
+ "schema": "KSM",
2128
+ "name": "ApiKsm",
2129
+ "description": "Mapping between KSM and API. Imported from df_bridge_api_ksm.csv",
2130
+ "repository": {
2131
+ "type": "InMemory"
2132
+ },
2133
+ "standardFields": ["id"],
2134
+ "fields": [
2135
+ {
2136
+ "name": "apiId",
2137
+ "type": "Api",
2138
+ "label": "API"
2139
+ },
2140
+ {
2141
+ "name": "ksmId",
2142
+ "type": "Ksm",
2143
+ "label": "KSM"
2144
+ },
2145
+ {
2146
+ "name": "ksmType",
2147
+ "type": "String?",
2148
+ "label": "KSM Type",
2149
+ "description": "Type of KSM. Can be either 'Commodity', 'Intermediate', 'In-house intermediate', or 'TBD'."
2150
+ },
2151
+ {
2152
+ "name": "ksmNumber",
2153
+ "type": "String?",
2154
+ "label": "KSM Number",
2155
+ "description": "TBD"
2156
+ }
2157
+ ]
2158
+ },
2159
+ {
2160
+ "schema": "KSM",
2161
+ "name": "KsmSynonym",
2162
+ "description": "Synonyms for KSM. Imported from df_ksm_synonym.csv",
2163
+ "repository": {
2164
+ "type": "InMemory"
2165
+ },
2166
+ "standardFields": ["id"],
2167
+ "fields": [
2168
+ {
2169
+ "name": "ksmId",
2170
+ "type": "Ksm",
2171
+ "label": "KSM"
2172
+ },
2173
+ {
2174
+ "name": "synonym",
2175
+ "type": "String",
2176
+ "label": "Synonym"
2177
+ }
2178
+ ]
2179
+ },
2180
+ {
2181
+ "schema": "KSM",
2182
+ "name": "KsmCompany",
2183
+ "description": "Company referred to by KSM data. Currently only has data from df_preferred_company.csv",
2184
+ "repository": {
2185
+ "type": "InMemory"
2186
+ },
2187
+ "standardFields": ["id", "name"],
2188
+ "fields": [
2189
+ {
2190
+ "name": "countryId",
2191
+ "type": "Country?",
2192
+ "label": "Country",
2193
+ "description": "Country of the company."
2194
+ }
2195
+ ]
2196
+ },
2197
+ {
2198
+ "schema": "KSM",
2199
+ "name": "CompanyKsmCompany",
2200
+ "description": "Mapping between KSM company and company. Imported from msm_bridge_df_ksm_importer.csv",
2201
+ "repository": {
2202
+ "type": "InMemory"
2203
+ },
2204
+ "standardFields": ["id"],
2205
+ "fields": [
2206
+ {
2207
+ "name": "companyId",
2208
+ "type": "Company",
2209
+ "label": "Company"
2210
+ },
2211
+ {
2212
+ "name": "ksmCompanyId",
2213
+ "type": "KsmCompany",
2214
+ "label": "KSM company"
2215
+ }
2216
+ ]
2217
+ },
2218
+ {
2219
+ "schema": "KSM",
2220
+ "name": "KsmProduct",
2221
+ "description": "Product information for KSM. Imported from df_ksm_product_details.csv",
2222
+ "repository": {
2223
+ "type": "InMemory"
2224
+ },
2225
+ "standardFields": ["id", "name"]
2226
+ },
2227
+ {
2228
+ "schema": "KSM",
2229
+ "name": "KsmTrade",
2230
+ "description": "Import/export information for KSM. Imported from df_ksm_trade.csv",
2231
+ "repository": {
2232
+ "type": "InMemory"
2233
+ },
2234
+ "standardFields": ["id"],
2235
+ "fields": [
2236
+ {
2237
+ "name": "ksmId",
2238
+ "type": "Ksm",
2239
+ "label": "KSM"
2240
+ },
2241
+ {
2242
+ "name": "importingCompanyId",
2243
+ "type": "KsmCompany",
2244
+ "prismaRelationFieldName": "ksmImportingCompany",
2245
+ "label": "Importing company"
2246
+ },
2247
+ {
2248
+ "name": "exportingCompanyId",
2249
+ "type": "KsmCompany",
2250
+ "prismaRelationFieldName": "ksmExportingCompany",
2251
+ "label": "Exporting company"
2252
+ },
2253
+ {
2254
+ "name": "weight",
2255
+ "type": "Float",
2256
+ "label": "Weight in KG",
2257
+ "description": "Weight of traded KSM in KG."
2258
+ }
2259
+ ]
2260
+ },
2261
+ {
2262
+ "schema": "KSM",
2263
+ "name": "ApiTrade",
2264
+ "description": "Import/export information for API. Imported from df_api_trade.csv",
2265
+ "repository": {
2266
+ "type": "InMemory"
2267
+ },
2268
+ "standardFields": ["id"],
2269
+ "fields": [
2270
+ {
2271
+ "name": "apiId",
2272
+ "type": "Api",
2273
+ "label": "API"
2274
+ },
2275
+ {
2276
+ "name": "importingCompanyId",
2277
+ "type": "KsmCompany",
2278
+ "prismaRelationFieldName": "apiImportingCompany",
2279
+ "label": "Importing company"
2280
+ },
2281
+ {
2282
+ "name": "exportingCompanyId",
2283
+ "type": "KsmCompany",
2284
+ "prismaRelationFieldName": "apiExportingCompany",
2285
+ "label": "Exporting company"
2286
+ },
2287
+ {
2288
+ "name": "weight",
2289
+ "type": "Float",
2290
+ "label": "Weight in KG",
2291
+ "description": "Weight of traded API in KG."
2292
+ },
2293
+ {
2294
+ "name": "year",
2295
+ "type": "Int",
2296
+ "label": "Year of trade",
2297
+ "description": "Year of traded API."
2298
+ }
2299
+ ]
2300
+ }
2301
+ ],
2302
+ "enums": [
2303
+ {
2304
+ "name": "ServerIdentifier",
2305
+ "schema": "PXL",
2306
+ "members": ["Server1", "Server2"]
2307
+ },
2308
+ {
2309
+ "name": "DrugProductRiskTimeframe",
2310
+ "schema": "MSM",
2311
+ "members": [
2312
+ {
2313
+ "value": "shortTerm",
2314
+ "description": "4-6 months"
2315
+ },
2316
+ {
2317
+ "value": "longTerm",
2318
+ "description": "7-12 months"
2319
+ }
2320
+ ]
2321
+ },
2322
+ {
2323
+ "name": "ProductStatus",
2324
+ "schema": "MSM",
2325
+ "members": ["Active", "Inactive", "Blank"]
2326
+ },
2327
+ {
2328
+ "name": "ProductLabel",
2329
+ "schema": "MSM",
2330
+ "members": ["Original", "Repack", "Unknown"]
2331
+ },
2332
+ {
2333
+ "name": "ProductionType",
2334
+ "schema": "MSM",
2335
+ "description": "Type to distinguish between API and FDF production.",
2336
+ "members": ["API", "FDF"]
2337
+ },
2338
+ {
2339
+ "name": "InspectionResultType",
2340
+ "schema": "MSM",
2341
+ "members": ["VAI", "OAI", "NAI"]
2342
+ },
2343
+ {
2344
+ "name": "WarningLetterSource",
2345
+ "schema": "MSM",
2346
+ "members": ["CDER", "CBER"]
2347
+ },
2348
+ {
2349
+ "name": "MapConfidence",
2350
+ "schema": "MSM",
2351
+ "members": ["High", "Medium", "Low"]
2352
+ },
2353
+ {
2354
+ "name": "NewsType",
2355
+ "schema": "User",
2356
+ "members": [
2357
+ "Inspection",
2358
+ "WarningLetter",
2359
+ "GenericNews",
2360
+ "Shortage",
2361
+ "ShortageResolved",
2362
+ "ProductDiscontinuation",
2363
+ "Fda483",
2364
+ "ReportReleased",
2365
+ "DrugProductRiskChange",
2366
+ "ProductRecall",
2367
+ "ManualNotification"
2368
+ ]
2369
+ },
2370
+ {
2371
+ "name": "RecordConfidence",
2372
+ "schema": "MSM",
2373
+ "members": [
2374
+ {
2375
+ "value": "High",
2376
+ "description": "High confidence in the record."
2377
+ },
2378
+ {
2379
+ "value": "Medium",
2380
+ "description": "Medium confidence in the record."
2381
+ },
2382
+ {
2383
+ "value": "Low",
2384
+ "description": "Low confidence in the record."
2385
+ },
2386
+ {
2387
+ "value": "NA",
2388
+ "description": "Record confidence is not available."
2389
+ }
2390
+ ]
2391
+ },
2392
+ {
2393
+ "name": "DmfType",
2394
+ "schema": "MSM",
2395
+ "members": [
2396
+ {
2397
+ "value": "API",
2398
+ "description": "Active Pharmaceutical Ingredient (API)"
2399
+ },
2400
+ {
2401
+ "value": "FDF",
2402
+ "description": "Finished Dosage Form (FDF)"
2403
+ }
2404
+ ]
2405
+ },
2406
+ {
2407
+ "name": "NdcGroupRecentShortageChangeStatus",
2408
+ "schema": "MSM",
2409
+ "members": [
2410
+ {
2411
+ "value": "New",
2412
+ "description": "The shortage is new."
2413
+ },
2414
+ {
2415
+ "value": "Resolved",
2416
+ "description": "The shortage has been resolved."
2417
+ },
2418
+ {
2419
+ "value": "ToBeDiscontinued",
2420
+ "description": "The product will be discontinued."
2421
+ }
2422
+ ]
2423
+ },
2424
+ {
2425
+ "name": "NdcGroupShortageHistoryStatus",
2426
+ "schema": "MSM",
2427
+ "members": [
2428
+ {
2429
+ "value": "Active",
2430
+ "description": "The shortage is active."
2431
+ },
2432
+ {
2433
+ "value": "NoShortage",
2434
+ "description": "The product is not in shortage."
2435
+ },
2436
+ {
2437
+ "value": "Resolved",
2438
+ "description": "The shortage has been resolved."
2439
+ },
2440
+ {
2441
+ "value": "ToBeDiscontinued",
2442
+ "description": "The product will be discontinued."
2443
+ }
2444
+ ]
2445
+ },
2446
+ {
2447
+ "name": "NdcGroupShortageType",
2448
+ "schema": "MSM",
2449
+ "members": [
2450
+ {
2451
+ "value": "FDA",
2452
+ "description": "The shortage is sourced from the FDA."
2453
+ },
2454
+ {
2455
+ "value": "ASHP",
2456
+ "description": "The shortage is sourced from the ASHP."
2457
+ }
2458
+ ]
2459
+ },
2460
+ {
2461
+ "name": "ProductRecallStatus",
2462
+ "schema": "MSM",
2463
+ "members": [
2464
+ {
2465
+ "value": "Ongoing",
2466
+ "description": "The recall is ongoing."
2467
+ },
2468
+ {
2469
+ "value": "Completed",
2470
+ "description": "The recall has been completed."
2471
+ },
2472
+ {
2473
+ "value": "Terminated",
2474
+ "description": "The recall has been terminated."
2475
+ }
2476
+ ]
2477
+ },
2478
+ {
2479
+ "name": "YesNoBlank",
2480
+ "schema": "MSM",
2481
+ "members": ["Yes", "No", "Blank"]
2482
+ },
2483
+ {
2484
+ "name": "KsmImportExportStatus",
2485
+ "schema": "KSM",
2486
+ "members": [
2487
+ {
2488
+ "value": "Neither",
2489
+ "description": "Neither imported nor exported"
2490
+ },
2491
+ {
2492
+ "value": "ImportOnly",
2493
+ "description": "Only imported into USA"
2494
+ },
2495
+ {
2496
+ "value": "ExportOnly",
2497
+ "description": "Only exported from USA"
2498
+ },
2499
+ {
2500
+ "value": "Both",
2501
+ "description": "Both exported and imported"
2502
+ },
2503
+ {
2504
+ "value": "Unknown",
2505
+ "description": " Unknown (not mapped in trade data)"
2506
+ }
2507
+ ]
2508
+ },
2509
+ {
2510
+ "name": "ReferenceListedDrug",
2511
+ "schema": "MSM",
2512
+ "members": ["RLD"]
2513
+ }
2514
+ ]
2515
+ }