@quesmed/types-rn 2.6.273 → 2.6.275
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/package.json
CHANGED
|
@@ -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 {
|
|
@@ -115,11 +115,9 @@ const getStationScore = (marks) => {
|
|
|
115
115
|
}
|
|
116
116
|
const { total, userScore } = marks.reduce((acc, mark) => {
|
|
117
117
|
const choices = mark.osceStationMark?.choices;
|
|
118
|
-
const
|
|
118
|
+
const isDualMark = mark.secondaryMark != null;
|
|
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 += isDualMark ? 4 : choices?.length ? 2 : 1;
|
|
123
121
|
if (choices) {
|
|
124
122
|
// paces product
|
|
125
123
|
acc.userScore += MarkMap[mark.mark] ?? 0;
|