@quesmed/types 2.6.273 → 2.6.274
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.
|
@@ -103,9 +103,9 @@ exports.MARK_OSCE_MARKSHEET_MARK = (0, client_1.gql) `
|
|
|
103
103
|
`;
|
|
104
104
|
const getStationScore = (marks) => {
|
|
105
105
|
const MarkMap = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
[models_1.EPaceMarkType.SATISFACTORY]: 2,
|
|
107
|
+
[models_1.EPaceMarkType.BORDERLINE]: 1,
|
|
108
|
+
[models_1.EPaceMarkType.UN_SATISFACTORY]: 0,
|
|
109
109
|
};
|
|
110
110
|
if (!marks?.length) {
|
|
111
111
|
return {
|
|
@@ -117,9 +117,7 @@ const getStationScore = (marks) => {
|
|
|
117
117
|
const choices = mark.osceStationMark?.choices;
|
|
118
118
|
const multiplier = mark.secondaryMark ? 2 : 1;
|
|
119
119
|
// Maximum possible score
|
|
120
|
-
acc.total += choices?.length
|
|
121
|
-
? choices.reduce((sum, choice) => sum + multiplier * choice.score, 0)
|
|
122
|
-
: 1;
|
|
120
|
+
acc.total += multiplier ? 4 : choices?.length ? 2 : 1;
|
|
123
121
|
if (choices) {
|
|
124
122
|
// paces product
|
|
125
123
|
acc.userScore += MarkMap[mark.mark] ?? 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
import { EProductType, } from '../../../models';
|
|
2
|
+
import { EPaceMarkType, EProductType, } from '../../../models';
|
|
3
3
|
import { COMPLETED_OSCE_STATION_FRAGMENT, OSCE_MARKSHEET_FIELDS, OSCE_MATCHMAKING_ACTION_FIELDS, OSCE_STATION_FIELDS, } from '../../fragments';
|
|
4
4
|
export const START_OSCE_MATCHMAKING = gql `
|
|
5
5
|
mutation StartOsceMatchmaking($sessionId: String!) {
|
|
@@ -100,9 +100,9 @@ export const MARK_OSCE_MARKSHEET_MARK = gql `
|
|
|
100
100
|
`;
|
|
101
101
|
export const getStationScore = (marks) => {
|
|
102
102
|
const MarkMap = {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
[EPaceMarkType.SATISFACTORY]: 2,
|
|
104
|
+
[EPaceMarkType.BORDERLINE]: 1,
|
|
105
|
+
[EPaceMarkType.UN_SATISFACTORY]: 0,
|
|
106
106
|
};
|
|
107
107
|
if (!marks?.length) {
|
|
108
108
|
return {
|
|
@@ -114,9 +114,7 @@ export const getStationScore = (marks) => {
|
|
|
114
114
|
const choices = mark.osceStationMark?.choices;
|
|
115
115
|
const multiplier = mark.secondaryMark ? 2 : 1;
|
|
116
116
|
// Maximum possible score
|
|
117
|
-
acc.total += choices?.length
|
|
118
|
-
? choices.reduce((sum, choice) => sum + multiplier * choice.score, 0)
|
|
119
|
-
: 1;
|
|
117
|
+
acc.total += multiplier ? 4 : choices?.length ? 2 : 1;
|
|
120
118
|
if (choices) {
|
|
121
119
|
// paces product
|
|
122
120
|
acc.userScore += MarkMap[mark.mark] ?? 0;
|