@quesmed/types 2.6.12 → 2.6.14

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 (39) hide show
  1. package/dist/cjs/models/Concept.d.ts +2 -0
  2. package/dist/cjs/models/Marksheet.d.ts +2 -1
  3. package/dist/cjs/models/Marksheet.js +1 -0
  4. package/dist/cjs/models/Product.d.ts +34 -1
  5. package/dist/cjs/models/Product.js +5 -0
  6. package/dist/cjs/models/Psa.d.ts +36 -0
  7. package/dist/cjs/models/Psa.js +12 -0
  8. package/dist/cjs/models/Question.d.ts +2 -0
  9. package/dist/cjs/models/Topic.d.ts +3 -1
  10. package/dist/cjs/models/index.d.ts +1 -0
  11. package/dist/cjs/models/index.js +1 -0
  12. package/dist/cjs/resolvers/query/restricted/index.d.ts +2 -0
  13. package/dist/cjs/resolvers/query/restricted/index.js +2 -0
  14. package/dist/cjs/resolvers/query/restricted/products.d.ts +5 -0
  15. package/dist/cjs/resolvers/query/restricted/products.js +38 -0
  16. package/dist/cjs/resolvers/query/restricted/psa.d.ts +13 -0
  17. package/dist/cjs/resolvers/query/restricted/psa.js +50 -0
  18. package/dist/cjs/resolvers/query/restricted/topics.d.ts +1 -6
  19. package/dist/cjs/resolvers/query/restricted/topics.js +1 -34
  20. package/dist/mjs/models/Concept.d.ts +2 -0
  21. package/dist/mjs/models/Marksheet.d.ts +2 -1
  22. package/dist/mjs/models/Marksheet.js +1 -0
  23. package/dist/mjs/models/Product.d.ts +34 -1
  24. package/dist/mjs/models/Product.js +5 -0
  25. package/dist/mjs/models/Psa.d.ts +36 -0
  26. package/dist/mjs/models/Psa.js +9 -0
  27. package/dist/mjs/models/Question.d.ts +2 -0
  28. package/dist/mjs/models/Topic.d.ts +3 -1
  29. package/dist/mjs/models/index.d.ts +1 -0
  30. package/dist/mjs/models/index.js +1 -0
  31. package/dist/mjs/resolvers/query/restricted/index.d.ts +2 -0
  32. package/dist/mjs/resolvers/query/restricted/index.js +2 -0
  33. package/dist/mjs/resolvers/query/restricted/products.d.ts +5 -0
  34. package/dist/mjs/resolvers/query/restricted/products.js +35 -0
  35. package/dist/mjs/resolvers/query/restricted/psa.d.ts +13 -0
  36. package/dist/mjs/resolvers/query/restricted/psa.js +47 -0
  37. package/dist/mjs/resolvers/query/restricted/topics.d.ts +1 -6
  38. package/dist/mjs/resolvers/query/restricted/topics.js +0 -33
  39. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import { IChapter } from './Chapter';
2
2
  import { EPaceType } from './Paces';
3
+ import { EProductType } from './Product';
3
4
  import { ITopic } from './Topic';
4
5
  import { Id } from './Type';
5
6
  import { EUserLearningStatus } from './User';
@@ -17,6 +18,7 @@ export interface IConcept {
17
18
  videos?: IVideo[];
18
19
  demo?: boolean;
19
20
  typeId?: EPaceType | null;
21
+ entitlement: EProductType | null;
20
22
  totalQuestions?: number | null;
21
23
  correctQuestions?: number | null;
22
24
  incorrectQuestions?: number | null;
@@ -17,7 +17,8 @@ export declare enum MARKSHEET_SOURCE {
17
17
  UKMLA_QUIZ = "UKMLA Quiz",
18
18
  GROUP_STUDY = "Qbank group study",
19
19
  FLAGGED_QUESTIONS_REVIEW = "Flagged Questions Review",
20
- FLAGGED_QUESTIONS_QUIZ = "Flagged Questions Quiz"
20
+ FLAGGED_QUESTIONS_QUIZ = "Flagged Questions Quiz",
21
+ SEARCH_QUESTIONS_QUIZ = "search Questions"
21
22
  }
22
23
  export declare enum EStudyAction {
23
24
  START = 0,
@@ -17,6 +17,7 @@ var MARKSHEET_SOURCE;
17
17
  MARKSHEET_SOURCE["GROUP_STUDY"] = "Qbank group study";
18
18
  MARKSHEET_SOURCE["FLAGGED_QUESTIONS_REVIEW"] = "Flagged Questions Review";
19
19
  MARKSHEET_SOURCE["FLAGGED_QUESTIONS_QUIZ"] = "Flagged Questions Quiz";
20
+ MARKSHEET_SOURCE["SEARCH_QUESTIONS_QUIZ"] = "search Questions";
20
21
  })(MARKSHEET_SOURCE = exports.MARKSHEET_SOURCE || (exports.MARKSHEET_SOURCE = {}));
21
22
  var EStudyAction;
22
23
  (function (EStudyAction) {
@@ -14,7 +14,12 @@ export declare enum EProductType {
14
14
  INTERVIEW_ANAESTHETICS = 11,
15
15
  INTERVIEW_CST = 12,
16
16
  INTERVIEW_IMT = 13,
17
- INTERVIEW_RADIOLOGY = 14
17
+ INTERVIEW_RADIOLOGY = 14,
18
+ CLINICAL = 15,
19
+ DATA_INTERPRETATION = 16,
20
+ CLINICAL_SUBSET = 17,
21
+ CLINICAL_PROBLEM_SOLVING = 18,
22
+ PROFESSIONAL_DILEMMA = 19
18
23
  }
19
24
  export interface IProduct {
20
25
  id: Id;
@@ -31,6 +36,7 @@ export interface IProduct {
31
36
  export interface IProductType {
32
37
  id: Id;
33
38
  name: string;
39
+ displayName: string;
34
40
  }
35
41
  export declare enum EAppType {
36
42
  AMS = 1,
@@ -39,3 +45,30 @@ export declare enum EAppType {
39
45
  INTERVIEW = 4,
40
46
  MSRA = 5
41
47
  }
48
+ export interface IEntitlementType {
49
+ id: EProductType;
50
+ name: string;
51
+ displayName: string;
52
+ totalQuestions?: number | null;
53
+ completedQuestions?: number | null;
54
+ correctQuestions?: number | null;
55
+ incorrectQuestions?: number | null;
56
+ totalCards?: number | null;
57
+ greenCards?: number | null;
58
+ yellowCards?: number | null;
59
+ redCards?: number | null;
60
+ dailyFeedCards?: number | null;
61
+ }
62
+ export interface IProductStats {
63
+ userId: number;
64
+ totalQuestions?: number | null;
65
+ completedQuestions?: number | null;
66
+ correctQuestions?: number | null;
67
+ incorrectQuestions?: number | null;
68
+ totalCards?: number | null;
69
+ greenCards?: number | null;
70
+ yellowCards?: number | null;
71
+ redCards?: number | null;
72
+ dailyFeedCards?: number | null;
73
+ entitlements?: IEntitlementType[];
74
+ }
@@ -18,6 +18,11 @@ var EProductType;
18
18
  EProductType[EProductType["INTERVIEW_CST"] = 12] = "INTERVIEW_CST";
19
19
  EProductType[EProductType["INTERVIEW_IMT"] = 13] = "INTERVIEW_IMT";
20
20
  EProductType[EProductType["INTERVIEW_RADIOLOGY"] = 14] = "INTERVIEW_RADIOLOGY";
21
+ EProductType[EProductType["CLINICAL"] = 15] = "CLINICAL";
22
+ EProductType[EProductType["DATA_INTERPRETATION"] = 16] = "DATA_INTERPRETATION";
23
+ EProductType[EProductType["CLINICAL_SUBSET"] = 17] = "CLINICAL_SUBSET";
24
+ EProductType[EProductType["CLINICAL_PROBLEM_SOLVING"] = 18] = "CLINICAL_PROBLEM_SOLVING";
25
+ EProductType[EProductType["PROFESSIONAL_DILEMMA"] = 19] = "PROFESSIONAL_DILEMMA";
21
26
  })(EProductType = exports.EProductType || (exports.EProductType = {}));
22
27
  var EAppType;
23
28
  (function (EAppType) {
@@ -0,0 +1,36 @@
1
+ import { Id } from './Type';
2
+ export declare enum EPrescriptionType {
3
+ Drug = 0,
4
+ Dose = 1,
5
+ Duration = 2,
6
+ Frequency = 3,
7
+ Route = 4,
8
+ Unit = 5
9
+ }
10
+ export interface IPrescriptionItem {
11
+ id: Id;
12
+ name: string;
13
+ typeId: EPrescriptionType;
14
+ }
15
+ export interface IQuestionPrescription {
16
+ id: Id;
17
+ questionId: Id;
18
+ doseId: Id;
19
+ doseDisplay: string;
20
+ doseVisible: boolean;
21
+ drugId: Id;
22
+ drugDisplay: string;
23
+ drugVisible: boolean;
24
+ routeId: Id;
25
+ routeDisplay: string;
26
+ routeVisible: boolean;
27
+ frequencyId: Id;
28
+ frequencyDisplay: string;
29
+ frequencyVisible: boolean;
30
+ durationId: Id;
31
+ durationDisplay: string;
32
+ durationVisible: boolean;
33
+ unitId: Id;
34
+ unitDisplay: string;
35
+ unitVisible: boolean;
36
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EPrescriptionType = void 0;
4
+ var EPrescriptionType;
5
+ (function (EPrescriptionType) {
6
+ EPrescriptionType[EPrescriptionType["Drug"] = 0] = "Drug";
7
+ EPrescriptionType[EPrescriptionType["Dose"] = 1] = "Dose";
8
+ EPrescriptionType[EPrescriptionType["Duration"] = 2] = "Duration";
9
+ EPrescriptionType[EPrescriptionType["Frequency"] = 3] = "Frequency";
10
+ EPrescriptionType[EPrescriptionType["Route"] = 4] = "Route";
11
+ EPrescriptionType[EPrescriptionType["Unit"] = 5] = "Unit";
12
+ })(EPrescriptionType = exports.EPrescriptionType || (exports.EPrescriptionType = {}));
@@ -3,6 +3,7 @@ import { ICondition } from './Condition';
3
3
  import { EDifficultyType } from './Difficulty';
4
4
  import { IPicture } from './Picture';
5
5
  import { IPresentation } from './Presentation';
6
+ import { IQuestionPrescription } from './Psa';
6
7
  import { ITopic } from './Topic';
7
8
  import { Id } from './Type';
8
9
  import { IUkmlaTopic } from './UkmlaTopic';
@@ -87,6 +88,7 @@ export interface IQuestion {
87
88
  difficulty: EDifficultyType;
88
89
  elo: number;
89
90
  psaSectionId: EPsaSectionType;
91
+ prescriptions?: IQuestionPrescription[];
90
92
  likes?: number;
91
93
  dislikes?: number;
92
94
  isLikedByMe?: EQuestionLike;
@@ -1,4 +1,5 @@
1
1
  import { IConcept } from './Concept';
2
+ import { EProductType } from './Product';
2
3
  import { Id } from './Type';
3
4
  export declare enum ETopicType {
4
5
  ALL = 0,
@@ -48,8 +49,9 @@ export interface ITopic {
48
49
  deletedAt: number | Date;
49
50
  name: string;
50
51
  demo?: boolean;
51
- concepts?: IConcept[];
52
+ entitlement?: IConcept[];
52
53
  typeId: ETopicType | null;
54
+ productId: EProductType | null;
53
55
  type?: ITopicType | null;
54
56
  totalQuestions?: number | null;
55
57
  correctQuestions?: number | null;
@@ -19,6 +19,7 @@ export * from './Presentation';
19
19
  export * from './Preset';
20
20
  export * from './Product';
21
21
  export * from './Promo';
22
+ export * from './Psa';
22
23
  export * from './Question';
23
24
  export * from './Referrals';
24
25
  export * from './Subscription';
@@ -35,6 +35,7 @@ __exportStar(require("./Presentation"), exports);
35
35
  __exportStar(require("./Preset"), exports);
36
36
  __exportStar(require("./Product"), exports);
37
37
  __exportStar(require("./Promo"), exports);
38
+ __exportStar(require("./Psa"), exports);
38
39
  __exportStar(require("./Question"), exports);
39
40
  __exportStar(require("./Referrals"), exports);
40
41
  __exportStar(require("./Subscription"), exports);
@@ -6,6 +6,8 @@ export * from './mockTests';
6
6
  export * from './notification';
7
7
  export * from './osce';
8
8
  export * from './preset';
9
+ export * from './products';
10
+ export * from './psa';
9
11
  export * from './qBank';
10
12
  export * from './quesBook';
11
13
  export * from './question';
@@ -22,6 +22,8 @@ __exportStar(require("./mockTests"), exports);
22
22
  __exportStar(require("./notification"), exports);
23
23
  __exportStar(require("./osce"), exports);
24
24
  __exportStar(require("./preset"), exports);
25
+ __exportStar(require("./products"), exports);
26
+ __exportStar(require("./psa"), exports);
25
27
  __exportStar(require("./qBank"), exports);
26
28
  __exportStar(require("./quesBook"), exports);
27
29
  __exportStar(require("./question"), exports);
@@ -0,0 +1,5 @@
1
+ import { IProductStats } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export type IProductStatsVar = null;
4
+ export type IProductStatsData = RestrictedData<graphqlNormalize & IProductStats, 'productStats'>;
5
+ export declare const PRODUCT_STATS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRODUCT_STATS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.PRODUCT_STATS = (0, client_1.gql) `
6
+ query ProductStats($entitlementId: [Int!]) {
7
+ restricted {
8
+ productStats(entitlementId: $entitlementId) {
9
+ totalQuestions
10
+ completedQuestions
11
+ correctQuestions
12
+ incorrectQuestions
13
+
14
+ redCards
15
+ totalCards
16
+ greenCards
17
+ yellowCards
18
+ dailyFeedCards
19
+
20
+ entitlements {
21
+ id
22
+ name
23
+ displayName
24
+ totalQuestions
25
+ completedQuestions
26
+ correctQuestions
27
+ incorrectQuestions
28
+
29
+ redCards
30
+ totalCards
31
+ greenCards
32
+ yellowCards
33
+ dailyFeedCards
34
+ }
35
+ }
36
+ }
37
+ }
38
+ `;
@@ -0,0 +1,13 @@
1
+ import { EPrescriptionType, IPrescriptionItem } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export interface IPrescriptionsVar {
4
+ query: string;
5
+ limit?: number;
6
+ cursor?: number;
7
+ typeId: EPrescriptionType;
8
+ }
9
+ export type IPrescriptionsData = RestrictedData<graphqlNormalize & {
10
+ total: number;
11
+ result: IPrescriptionItem[];
12
+ }, 'prescriptions'>;
13
+ export declare const PRESCRIPTIONS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESCRIPTIONS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.PRESCRIPTIONS = (0, client_1.gql) `
6
+ query Prescriptions($typeId: Int!, $query: String, $cursor: Int, $limit: Int) {
7
+ restricted {
8
+ prescriptions(
9
+ typeId: $typeId
10
+ query: $query
11
+ cursor: $cursor
12
+ limit: $limit
13
+ ) {
14
+ total
15
+ result {
16
+ ... on Drug {
17
+ id
18
+ name
19
+ __typename
20
+ }
21
+ ... on Dose {
22
+ id
23
+ name
24
+ __typename
25
+ }
26
+ ... on Duration {
27
+ id
28
+ name
29
+ __typename
30
+ }
31
+ ... on Frequency {
32
+ id
33
+ name
34
+ __typename
35
+ }
36
+ ... on Route {
37
+ id
38
+ name
39
+ __typename
40
+ }
41
+ ... on Unit {
42
+ id
43
+ name
44
+ __typename
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ `;
@@ -1,11 +1,6 @@
1
- import { ETopicType, Id, ITopic, ITopicStats } from '../../../models';
1
+ import { ETopicType, Id, ITopic } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  import { ESortOrder } from '../../enums';
4
- export interface ITopicStatsVar {
5
- typeId?: ETopicType[];
6
- }
7
- export type ITopicStatsData = RestrictedData<graphqlNormalize & ITopicStats, 'topicStats'>;
8
- export declare const TOPIC_STATS: import("@apollo/client").DocumentNode;
9
4
  export interface ITopicVar {
10
5
  id: Id;
11
6
  }
@@ -1,40 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FLASHCARDS_TOPICS = exports.QUESTION_TOPICS = exports.TOPICS = exports.TOPIC = exports.TOPIC_STATS = void 0;
3
+ exports.FLASHCARDS_TOPICS = exports.QUESTION_TOPICS = exports.TOPICS = exports.TOPIC = void 0;
4
4
  const client_1 = require("@apollo/client");
5
- exports.TOPIC_STATS = (0, client_1.gql) `
6
- query TopicStats($typeId: [Int!]) {
7
- restricted {
8
- topicStats(typeId: $typeId) {
9
- totalQuestions
10
- completedQuestions
11
- correctQuestions
12
- incorrectQuestions
13
-
14
- redCards
15
- totalCards
16
- greenCards
17
- yellowCards
18
- dailyFeedCards
19
-
20
- types {
21
- id
22
- name
23
- totalQuestions
24
- completedQuestions
25
- correctQuestions
26
- incorrectQuestions
27
-
28
- redCards
29
- totalCards
30
- greenCards
31
- yellowCards
32
- dailyFeedCards
33
- }
34
- }
35
- }
36
- }
37
- `;
38
5
  exports.TOPIC = (0, client_1.gql) `
39
6
  query Topic($topicId: Int!) {
40
7
  restricted {
@@ -1,5 +1,6 @@
1
1
  import { IChapter } from './Chapter';
2
2
  import { EPaceType } from './Paces';
3
+ import { EProductType } from './Product';
3
4
  import { ITopic } from './Topic';
4
5
  import { Id } from './Type';
5
6
  import { EUserLearningStatus } from './User';
@@ -17,6 +18,7 @@ export interface IConcept {
17
18
  videos?: IVideo[];
18
19
  demo?: boolean;
19
20
  typeId?: EPaceType | null;
21
+ entitlement: EProductType | null;
20
22
  totalQuestions?: number | null;
21
23
  correctQuestions?: number | null;
22
24
  incorrectQuestions?: number | null;
@@ -17,7 +17,8 @@ export declare enum MARKSHEET_SOURCE {
17
17
  UKMLA_QUIZ = "UKMLA Quiz",
18
18
  GROUP_STUDY = "Qbank group study",
19
19
  FLAGGED_QUESTIONS_REVIEW = "Flagged Questions Review",
20
- FLAGGED_QUESTIONS_QUIZ = "Flagged Questions Quiz"
20
+ FLAGGED_QUESTIONS_QUIZ = "Flagged Questions Quiz",
21
+ SEARCH_QUESTIONS_QUIZ = "search Questions"
21
22
  }
22
23
  export declare enum EStudyAction {
23
24
  START = 0,
@@ -14,6 +14,7 @@ export var MARKSHEET_SOURCE;
14
14
  MARKSHEET_SOURCE["GROUP_STUDY"] = "Qbank group study";
15
15
  MARKSHEET_SOURCE["FLAGGED_QUESTIONS_REVIEW"] = "Flagged Questions Review";
16
16
  MARKSHEET_SOURCE["FLAGGED_QUESTIONS_QUIZ"] = "Flagged Questions Quiz";
17
+ MARKSHEET_SOURCE["SEARCH_QUESTIONS_QUIZ"] = "search Questions";
17
18
  })(MARKSHEET_SOURCE || (MARKSHEET_SOURCE = {}));
18
19
  export var EStudyAction;
19
20
  (function (EStudyAction) {
@@ -14,7 +14,12 @@ export declare enum EProductType {
14
14
  INTERVIEW_ANAESTHETICS = 11,
15
15
  INTERVIEW_CST = 12,
16
16
  INTERVIEW_IMT = 13,
17
- INTERVIEW_RADIOLOGY = 14
17
+ INTERVIEW_RADIOLOGY = 14,
18
+ CLINICAL = 15,
19
+ DATA_INTERPRETATION = 16,
20
+ CLINICAL_SUBSET = 17,
21
+ CLINICAL_PROBLEM_SOLVING = 18,
22
+ PROFESSIONAL_DILEMMA = 19
18
23
  }
19
24
  export interface IProduct {
20
25
  id: Id;
@@ -31,6 +36,7 @@ export interface IProduct {
31
36
  export interface IProductType {
32
37
  id: Id;
33
38
  name: string;
39
+ displayName: string;
34
40
  }
35
41
  export declare enum EAppType {
36
42
  AMS = 1,
@@ -39,3 +45,30 @@ export declare enum EAppType {
39
45
  INTERVIEW = 4,
40
46
  MSRA = 5
41
47
  }
48
+ export interface IEntitlementType {
49
+ id: EProductType;
50
+ name: string;
51
+ displayName: string;
52
+ totalQuestions?: number | null;
53
+ completedQuestions?: number | null;
54
+ correctQuestions?: number | null;
55
+ incorrectQuestions?: number | null;
56
+ totalCards?: number | null;
57
+ greenCards?: number | null;
58
+ yellowCards?: number | null;
59
+ redCards?: number | null;
60
+ dailyFeedCards?: number | null;
61
+ }
62
+ export interface IProductStats {
63
+ userId: number;
64
+ totalQuestions?: number | null;
65
+ completedQuestions?: number | null;
66
+ correctQuestions?: number | null;
67
+ incorrectQuestions?: number | null;
68
+ totalCards?: number | null;
69
+ greenCards?: number | null;
70
+ yellowCards?: number | null;
71
+ redCards?: number | null;
72
+ dailyFeedCards?: number | null;
73
+ entitlements?: IEntitlementType[];
74
+ }
@@ -15,6 +15,11 @@ export var EProductType;
15
15
  EProductType[EProductType["INTERVIEW_CST"] = 12] = "INTERVIEW_CST";
16
16
  EProductType[EProductType["INTERVIEW_IMT"] = 13] = "INTERVIEW_IMT";
17
17
  EProductType[EProductType["INTERVIEW_RADIOLOGY"] = 14] = "INTERVIEW_RADIOLOGY";
18
+ EProductType[EProductType["CLINICAL"] = 15] = "CLINICAL";
19
+ EProductType[EProductType["DATA_INTERPRETATION"] = 16] = "DATA_INTERPRETATION";
20
+ EProductType[EProductType["CLINICAL_SUBSET"] = 17] = "CLINICAL_SUBSET";
21
+ EProductType[EProductType["CLINICAL_PROBLEM_SOLVING"] = 18] = "CLINICAL_PROBLEM_SOLVING";
22
+ EProductType[EProductType["PROFESSIONAL_DILEMMA"] = 19] = "PROFESSIONAL_DILEMMA";
18
23
  })(EProductType || (EProductType = {}));
19
24
  export var EAppType;
20
25
  (function (EAppType) {
@@ -0,0 +1,36 @@
1
+ import { Id } from './Type';
2
+ export declare enum EPrescriptionType {
3
+ Drug = 0,
4
+ Dose = 1,
5
+ Duration = 2,
6
+ Frequency = 3,
7
+ Route = 4,
8
+ Unit = 5
9
+ }
10
+ export interface IPrescriptionItem {
11
+ id: Id;
12
+ name: string;
13
+ typeId: EPrescriptionType;
14
+ }
15
+ export interface IQuestionPrescription {
16
+ id: Id;
17
+ questionId: Id;
18
+ doseId: Id;
19
+ doseDisplay: string;
20
+ doseVisible: boolean;
21
+ drugId: Id;
22
+ drugDisplay: string;
23
+ drugVisible: boolean;
24
+ routeId: Id;
25
+ routeDisplay: string;
26
+ routeVisible: boolean;
27
+ frequencyId: Id;
28
+ frequencyDisplay: string;
29
+ frequencyVisible: boolean;
30
+ durationId: Id;
31
+ durationDisplay: string;
32
+ durationVisible: boolean;
33
+ unitId: Id;
34
+ unitDisplay: string;
35
+ unitVisible: boolean;
36
+ }
@@ -0,0 +1,9 @@
1
+ export var EPrescriptionType;
2
+ (function (EPrescriptionType) {
3
+ EPrescriptionType[EPrescriptionType["Drug"] = 0] = "Drug";
4
+ EPrescriptionType[EPrescriptionType["Dose"] = 1] = "Dose";
5
+ EPrescriptionType[EPrescriptionType["Duration"] = 2] = "Duration";
6
+ EPrescriptionType[EPrescriptionType["Frequency"] = 3] = "Frequency";
7
+ EPrescriptionType[EPrescriptionType["Route"] = 4] = "Route";
8
+ EPrescriptionType[EPrescriptionType["Unit"] = 5] = "Unit";
9
+ })(EPrescriptionType || (EPrescriptionType = {}));
@@ -3,6 +3,7 @@ import { ICondition } from './Condition';
3
3
  import { EDifficultyType } from './Difficulty';
4
4
  import { IPicture } from './Picture';
5
5
  import { IPresentation } from './Presentation';
6
+ import { IQuestionPrescription } from './Psa';
6
7
  import { ITopic } from './Topic';
7
8
  import { Id } from './Type';
8
9
  import { IUkmlaTopic } from './UkmlaTopic';
@@ -87,6 +88,7 @@ export interface IQuestion {
87
88
  difficulty: EDifficultyType;
88
89
  elo: number;
89
90
  psaSectionId: EPsaSectionType;
91
+ prescriptions?: IQuestionPrescription[];
90
92
  likes?: number;
91
93
  dislikes?: number;
92
94
  isLikedByMe?: EQuestionLike;
@@ -1,4 +1,5 @@
1
1
  import { IConcept } from './Concept';
2
+ import { EProductType } from './Product';
2
3
  import { Id } from './Type';
3
4
  export declare enum ETopicType {
4
5
  ALL = 0,
@@ -48,8 +49,9 @@ export interface ITopic {
48
49
  deletedAt: number | Date;
49
50
  name: string;
50
51
  demo?: boolean;
51
- concepts?: IConcept[];
52
+ entitlement?: IConcept[];
52
53
  typeId: ETopicType | null;
54
+ productId: EProductType | null;
53
55
  type?: ITopicType | null;
54
56
  totalQuestions?: number | null;
55
57
  correctQuestions?: number | null;
@@ -19,6 +19,7 @@ export * from './Presentation';
19
19
  export * from './Preset';
20
20
  export * from './Product';
21
21
  export * from './Promo';
22
+ export * from './Psa';
22
23
  export * from './Question';
23
24
  export * from './Referrals';
24
25
  export * from './Subscription';
@@ -19,6 +19,7 @@ export * from './Presentation';
19
19
  export * from './Preset';
20
20
  export * from './Product';
21
21
  export * from './Promo';
22
+ export * from './Psa';
22
23
  export * from './Question';
23
24
  export * from './Referrals';
24
25
  export * from './Subscription';
@@ -6,6 +6,8 @@ export * from './mockTests';
6
6
  export * from './notification';
7
7
  export * from './osce';
8
8
  export * from './preset';
9
+ export * from './products';
10
+ export * from './psa';
9
11
  export * from './qBank';
10
12
  export * from './quesBook';
11
13
  export * from './question';
@@ -6,6 +6,8 @@ export * from './mockTests';
6
6
  export * from './notification';
7
7
  export * from './osce';
8
8
  export * from './preset';
9
+ export * from './products';
10
+ export * from './psa';
9
11
  export * from './qBank';
10
12
  export * from './quesBook';
11
13
  export * from './question';
@@ -0,0 +1,5 @@
1
+ import { IProductStats } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export type IProductStatsVar = null;
4
+ export type IProductStatsData = RestrictedData<graphqlNormalize & IProductStats, 'productStats'>;
5
+ export declare const PRODUCT_STATS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,35 @@
1
+ import { gql } from '@apollo/client';
2
+ export const PRODUCT_STATS = gql `
3
+ query ProductStats($entitlementId: [Int!]) {
4
+ restricted {
5
+ productStats(entitlementId: $entitlementId) {
6
+ totalQuestions
7
+ completedQuestions
8
+ correctQuestions
9
+ incorrectQuestions
10
+
11
+ redCards
12
+ totalCards
13
+ greenCards
14
+ yellowCards
15
+ dailyFeedCards
16
+
17
+ entitlements {
18
+ id
19
+ name
20
+ displayName
21
+ totalQuestions
22
+ completedQuestions
23
+ correctQuestions
24
+ incorrectQuestions
25
+
26
+ redCards
27
+ totalCards
28
+ greenCards
29
+ yellowCards
30
+ dailyFeedCards
31
+ }
32
+ }
33
+ }
34
+ }
35
+ `;
@@ -0,0 +1,13 @@
1
+ import { EPrescriptionType, IPrescriptionItem } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export interface IPrescriptionsVar {
4
+ query: string;
5
+ limit?: number;
6
+ cursor?: number;
7
+ typeId: EPrescriptionType;
8
+ }
9
+ export type IPrescriptionsData = RestrictedData<graphqlNormalize & {
10
+ total: number;
11
+ result: IPrescriptionItem[];
12
+ }, 'prescriptions'>;
13
+ export declare const PRESCRIPTIONS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,47 @@
1
+ import { gql } from '@apollo/client';
2
+ export const PRESCRIPTIONS = gql `
3
+ query Prescriptions($typeId: Int!, $query: String, $cursor: Int, $limit: Int) {
4
+ restricted {
5
+ prescriptions(
6
+ typeId: $typeId
7
+ query: $query
8
+ cursor: $cursor
9
+ limit: $limit
10
+ ) {
11
+ total
12
+ result {
13
+ ... on Drug {
14
+ id
15
+ name
16
+ __typename
17
+ }
18
+ ... on Dose {
19
+ id
20
+ name
21
+ __typename
22
+ }
23
+ ... on Duration {
24
+ id
25
+ name
26
+ __typename
27
+ }
28
+ ... on Frequency {
29
+ id
30
+ name
31
+ __typename
32
+ }
33
+ ... on Route {
34
+ id
35
+ name
36
+ __typename
37
+ }
38
+ ... on Unit {
39
+ id
40
+ name
41
+ __typename
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ `;
@@ -1,11 +1,6 @@
1
- import { ETopicType, Id, ITopic, ITopicStats } from '../../../models';
1
+ import { ETopicType, Id, ITopic } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  import { ESortOrder } from '../../enums';
4
- export interface ITopicStatsVar {
5
- typeId?: ETopicType[];
6
- }
7
- export type ITopicStatsData = RestrictedData<graphqlNormalize & ITopicStats, 'topicStats'>;
8
- export declare const TOPIC_STATS: import("@apollo/client").DocumentNode;
9
4
  export interface ITopicVar {
10
5
  id: Id;
11
6
  }
@@ -1,37 +1,4 @@
1
1
  import { gql } from '@apollo/client';
2
- export const TOPIC_STATS = gql `
3
- query TopicStats($typeId: [Int!]) {
4
- restricted {
5
- topicStats(typeId: $typeId) {
6
- totalQuestions
7
- completedQuestions
8
- correctQuestions
9
- incorrectQuestions
10
-
11
- redCards
12
- totalCards
13
- greenCards
14
- yellowCards
15
- dailyFeedCards
16
-
17
- types {
18
- id
19
- name
20
- totalQuestions
21
- completedQuestions
22
- correctQuestions
23
- incorrectQuestions
24
-
25
- redCards
26
- totalCards
27
- greenCards
28
- yellowCards
29
- dailyFeedCards
30
- }
31
- }
32
- }
33
- }
34
- `;
35
2
  export const TOPIC = gql `
36
3
  query Topic($topicId: Int!) {
37
4
  restricted {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.12",
3
+ "version": "2.6.14",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",