// Numbas version: finer_feedback_settings {"name": "Infusion duration with loading dose - step by step", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Infusion duration with loading dose - step by step", "tags": ["adaptive marking", "duration", "infusion"], "metadata": {"description": "
Applied calculation broken down in core calculation steps.
", "licence": "None specified"}, "statement": "A patient requires treatment during pregnancy.
The total prescribed dose is {total_dose} mg. The first {loading_dose} mg should be infused over {loading_time} minutes. The remainder should be infused at {maintenance_rate} mg/min.
How long will the entire infusion last?
", "advice": "The total dose the patient is prescribed is {total_dose}.
\nLoading dose
\nIn the first {loading_time} minutes, the patient receives {loading_dose} mg of medication.
\nThat means that they still need to receive
\nRemaining dose = {total_dose} - {loading_dose} = {remaining_dose} mg of medication.
\nTime taken for remaining dose
\nThe remaining medication ({remaining_dose} mg) is infused at the rate of {maintenance_rate} mg/min.
\nTime for the remainder = {remaining_dose} ÷ {maintenance_rate} = {maintenance_time} minutes.
\nFinal time
\nThis means that altogether the infusion took
\nTotal time = {loading_time} + {maintenance_time} = {total_time} minutes.
\nConverting units
\n{total_time} minutes, in hours is
\n{total_time}/60 = {hours_calc} hours
\nThis means the hours answer is {answer_hours}.
\n{answer_hours} hours takes {answer_hours}*60 = {mins_calc} minutes, so the minutes answer is
\n{total_time}- {mins_calc}={answer_minutes} minutes.
\nFinal answer
\n{answer_hours} hours {answer_minutes} minutes.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"loading_dose": {"name": "loading_dose", "group": "Ungrouped variables", "definition": "random([25,50,75,100])", "description": "", "templateType": "anything", "can_override": false}, "loading_time": {"name": "loading_time", "group": "Ungrouped variables", "definition": "random([10,15,20,30])", "description": "", "templateType": "anything", "can_override": false}, "maintenance_rate": {"name": "maintenance_rate", "group": "Ungrouped variables", "definition": "random([5,6,8,10,12])", "description": "", "templateType": "anything", "can_override": false}, "remaining_time": {"name": "remaining_time", "group": "Ungrouped variables", "definition": "random([30,45,60,75,90,105,120,135,150])", "description": "", "templateType": "anything", "can_override": false}, "total_dose": {"name": "total_dose", "group": "Ungrouped variables", "definition": "loading_dose+maintenance_rate*remaining_time", "description": "", "templateType": "anything", "can_override": false}, "remaining_dose": {"name": "remaining_dose", "group": "Ungrouped variables", "definition": "total_dose-loading_dose", "description": "", "templateType": "anything", "can_override": false}, "maintenance_time": {"name": "maintenance_time", "group": "Ungrouped variables", "definition": "remaining_dose/maintenance_rate", "description": "", "templateType": "anything", "can_override": false}, "total_time": {"name": "total_time", "group": "Ungrouped variables", "definition": "loading_time+maintenance_time", "description": "", "templateType": "anything", "can_override": false}, "answer_hours": {"name": "answer_hours", "group": "Ungrouped variables", "definition": "floor(total_time/60)", "description": "", "templateType": "anything", "can_override": false}, "answer_minutes": {"name": "answer_minutes", "group": "Ungrouped variables", "definition": "total_time-60*answer_hours", "description": "", "templateType": "anything", "can_override": false}, "hours_calc": {"name": "hours_calc", "group": "Ungrouped variables", "definition": "precround(total_time/60,2)", "description": "", "templateType": "anything", "can_override": false}, "mins_calc": {"name": "mins_calc", "group": "Ungrouped variables", "definition": "answer_hours*60", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["loading_dose", "loading_time", "maintenance_rate", "remaining_time", "total_dose", "remaining_dose", "maintenance_time", "total_time", "answer_hours", "answer_minutes", "hours_calc", "mins_calc"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Calculate the remaining dose", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "How much medication remains to be infused after the first {loading_time} minutes?
\nRemaining dose after {loading_time} minutes (mg):
", "minValue": "remaining_dose", "maxValue": "remaining_dose", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Calculate the maintenance infusion time", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "remaining_dose", "part": "p0", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "The remaining dose of medication should be infused at {maintenance_rate} mg/min. How long will it take to infuse this dose?
\nTime needed to infuse the remaining dose (minutes):
", "minValue": "maintenance_time", "maxValue": "maintenance_time", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Calculate the total duration in minutes", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "maintenance_time", "part": "p1", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "The loading dose was infused in the first {loading_time} minutes of the treatment, and you just calculated how long it took to infuse the remaining dose. How long did it to infuse the whole {total_dose} mg of the treatment?
\nTotal infusion duration including the loading-dose time (minutes):
", "minValue": "total_time", "maxValue": "total_time", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "gapfill", "useCustomName": true, "customName": "Convert the duration to hours and minutes", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "total_time", "part": "p2", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Now convert the total time taken (in minutes) to the number of whole hours and remaining minutes.
\nTotal duration: [[0]] hours [[1]] minutes
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "answer_hours", "maxValue": "answer_hours", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "answer_minutes", "maxValue": "answer_minutes", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "resources": []}]}], "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}]}