@quesmed/types-rn 2.6.12 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/Psa.d.ts +36 -0
- package/models/Psa.js +12 -0
- package/models/Question.d.ts +2 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
- package/resolvers/query/restricted/psa.d.ts +13 -0
- package/resolvers/query/restricted/psa.js +50 -0
package/models/Psa.d.ts
ADDED
|
@@ -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
|
+
}
|
package/models/Psa.js
ADDED
|
@@ -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 = {}));
|
package/models/Question.d.ts
CHANGED
|
@@ -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;
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -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);
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ __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("./psa"), exports);
|
|
25
26
|
__exportStar(require("./qBank"), exports);
|
|
26
27
|
__exportStar(require("./quesBook"), exports);
|
|
27
28
|
__exportStar(require("./question"), exports);
|
|
@@ -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
|
+
`;
|