// Numbas version: finer_feedback_settings {"name": "Applied calculations for midwifery", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": true, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Step by step", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Injection volume from a weight-based 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"}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "tags": ["adaptive marking", "injection volume", "weight-based dose"], "metadata": {"description": "
Applied calculation broken down in core calculation steps.
", "licence": "None specified"}, "statement": "You need to administer {dose_per_kg} units/kg of medication.
Your patient weighs {weight} kg. The injection available is {concentration} units/mL.
How many millilitres would you administer? Give your answer to two decimal places.
", "advice": "First, calculate what amount of medication (in units) your patient needs.
\nRequired dose = {dose_per_kg} units/kg × {weight} kg = {required_units} units.
\nThen use the concentration of the injection available to calculate the volume you need to administer.
\nVolume = {required_units} ÷ {concentration} = {volume_exact} mL.
\nRounded to two decimal places: {answer} mL.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"dose_per_kg": {"name": "dose_per_kg", "group": "Ungrouped variables", "definition": "random([5,10,15,20,25,30,40])", "description": "", "templateType": "anything", "can_override": false}, "weight": {"name": "weight", "group": "Ungrouped variables", "definition": "random([42,53,66,72,87,95,101])", "description": "", "templateType": "anything", "can_override": false}, "concentration": {"name": "concentration", "group": "Ungrouped variables", "definition": "random([500,750,1000])", "description": "", "templateType": "anything", "can_override": false}, "required_units": {"name": "required_units", "group": "Ungrouped variables", "definition": "dose_per_kg*weight", "description": "", "templateType": "anything", "can_override": false}, "volume_exact": {"name": "volume_exact", "group": "Ungrouped variables", "definition": "required_units/concentration", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "precround(volume_exact,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["dose_per_kg", "weight", "concentration", "required_units", "volume_exact", "answer"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Calculate the required 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": "You need to administer {dose_per_kg} units/kg of medication.
\nYour patient weighs {weight} kg.
\nWhat amount of medication (in units) does your patient need?
\nTotal dose required (units):
", "minValue": "required_units", "maxValue": "required_units", "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 injection volume", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "required_units", "part": "p0", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "You have calculate how much medication (in units) the patient needs. The injection available is {concentration} units/mL. What volume of medication does the patient need?
\nVolume to administer, to two decimal places (mL):
", "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 2, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true}, {"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"}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "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": {}, "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}, {"name": "Number of ampoules required - 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"}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "tags": ["adaptive marking", "ampoules", "unit conversion"], "metadata": {"description": "Applied calculation broken down in core calculation steps.
", "licence": "None specified"}, "statement": "A patient requires a maintenance dose of {required_dose_g} g medication every {frequency} hours during labour until delivery.
\nYou have {ampoule_strength_mg} mg ampoules available.
\nHow many ampoules are required to prepare the prescribed dose?
", "advice": "Convert the prescribed dose to milligrams:
\n{required_dose_g} g × 1000 = {required_dose_mg} mg.
\nNumber of ampoules = {required_dose_mg} ÷ {ampoule_strength_mg} = {number_of_ampoules} ampoules.
\n\nNote: The dosing frequency (every {frequency} hours) gives the interval between doses; it does not change the number of ampoules needed for one dose - that bit of information is irrelevant for this question.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"frequency": {"name": "frequency", "group": "Ungrouped variables", "definition": "random([4,6,8,12])", "description": "", "templateType": "anything", "can_override": false}, "ampoule_strength_mg": {"name": "ampoule_strength_mg", "group": "Ungrouped variables", "definition": "random([300,400,500,600])", "description": "", "templateType": "anything", "can_override": false}, "number_of_ampoules": {"name": "number_of_ampoules", "group": "Ungrouped variables", "definition": "random([1,2,3,4,5])", "description": "", "templateType": "anything", "can_override": false}, "required_dose_mg": {"name": "required_dose_mg", "group": "Ungrouped variables", "definition": "ampoule_strength_mg*number_of_ampoules", "description": "", "templateType": "anything", "can_override": false}, "required_dose_g": {"name": "required_dose_g", "group": "Ungrouped variables", "definition": "precround(required_dose_mg/1000,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["frequency", "ampoule_strength_mg", "number_of_ampoules", "required_dose_mg", "required_dose_g"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Convert the dose to milligrams", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A patient requires a maintenance dose of {required_dose_g} g of medication. Convert that to mg.
\nPrescribed dose in milligrams:
", "minValue": "required_dose_mg", "maxValue": "required_dose_mg", "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 number of ampoules", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "required_dose_mg", "part": "p0", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "You have calculated the prescribed dose in mg. You have {ampoule_strength_mg} mg ampoules available.
\nHow many ampoules are required to prepare the prescribed dose?
\nNumber of ampoules required:
", "minValue": "number_of_ampoules", "maxValue": "number_of_ampoules", "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"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true}]}, {"name": "Applied questions", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Injection volume from a weight-based dose - single answer", "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"}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "tags": ["injection volume", "single answer", "weight-based dose"], "metadata": {"description": "Randomised applied calculation practice.", "licence": "None specified"}, "statement": "You need to administer {dose_per_kg} units/kg of medication.
\nYour patient weighs {weight} kg. The injection available is {concentration} units/mL.
\nHow many millilitres would you administer? Give your answer to two decimal places.
", "advice": "First, calculate what amount of medication (in units) your patient needs.
\nRequired dose = {dose_per_kg} units/kg × {weight} kg = {required_units} units.
\nThen use the concentration of the injection available to calculate the volume you need to administer.
\nVolume = {required_units} ÷ {concentration} = {volume_exact} mL.
\nRounded to two decimal places: {answer} mL.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"dose_per_kg": {"name": "dose_per_kg", "group": "Ungrouped variables", "definition": "random([5,10,15,20,25,30,40])", "description": "", "templateType": "anything", "can_override": false}, "weight": {"name": "weight", "group": "Ungrouped variables", "definition": "random([42,53,66,72,87,95,101])", "description": "", "templateType": "anything", "can_override": false}, "concentration": {"name": "concentration", "group": "Ungrouped variables", "definition": "random([500,750,1000])", "description": "", "templateType": "anything", "can_override": false}, "required_units": {"name": "required_units", "group": "Ungrouped variables", "definition": "dose_per_kg*weight", "description": "", "templateType": "anything", "can_override": false}, "volume_exact": {"name": "volume_exact", "group": "Ungrouped variables", "definition": "required_units/concentration", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "precround(volume_exact,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["dose_per_kg", "weight", "concentration", "required_units", "volume_exact", "answer"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Volume to administer", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Volume to administer (mL):
", "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 2, "precisionPartialCredit": 0, "precisionMessage": "Check the requested unit and precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true}, {"name": "Infusion duration with loading dose - single answer", "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"}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "tags": ["duration", "infusion", "single answer"], "metadata": {"description": "Randomised applied calculation practice.", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "A patient requires treatment during pregnancy.
\nThe total prescribed dose is {total_dose} mg.
\nThe first {loading_dose} mg should be infused over {loading_time} minutes.
\nThe remainder should be infused at {maintenance_rate} mg/min.
\nHow 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
\nhours: {answer_hours}
\nminutes: {answer_minutes}
", "rulesets": {}, "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": "round(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": "gapfill", "useCustomName": true, "customName": "Total infusion duration", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Answer, in terms of how many hours and how many remaining minutes the treatment will take.
\nhours: [[0]]
\nminutes: [[1]]
", "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}, {"name": "Number of ampoules required - single answer", "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"}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "tags": ["ampoules", "single answer", "unit conversion"], "metadata": {"description": "Randomised applied calculation practice.", "licence": "None specified"}, "statement": "A patient requires a maintenance dose of {required_dose_g} g medication every {frequency} hours during labour until delivery.
\nYou have {ampoule_strength_mg} mg ampoules available.
\nHow many ampoules are required to prepare the prescribed dose?
", "advice": "Convert the prescribed dose to milligrams:
\n{required_dose_g} g × 1000 = {required_dose_mg} mg.
\nNumber of ampoules = {required_dose_mg} ÷ {ampoule_strength_mg} = {number_of_ampoules} ampoules.
\n\nNote: The dosing frequency (every {frequency} hours) gives the interval between doses; it does not change the number of ampoules needed for one dose - that bit of information is irrelevant for this question.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"frequency": {"name": "frequency", "group": "Ungrouped variables", "definition": "random([4,6,8,12])", "description": "", "templateType": "anything", "can_override": false}, "ampoule_strength_mg": {"name": "ampoule_strength_mg", "group": "Ungrouped variables", "definition": "random([300,400,500,600])", "description": "", "templateType": "anything", "can_override": false}, "number_of_ampoules": {"name": "number_of_ampoules", "group": "Ungrouped variables", "definition": "random([1,2,3,4,5])", "description": "", "templateType": "anything", "can_override": false}, "required_dose_mg": {"name": "required_dose_mg", "group": "Ungrouped variables", "definition": "ampoule_strength_mg*number_of_ampoules", "description": "", "templateType": "anything", "can_override": false}, "required_dose_g": {"name": "required_dose_g", "group": "Ungrouped variables", "definition": "precround(required_dose_mg/1000,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["frequency", "ampoule_strength_mg", "number_of_ampoules", "required_dose_mg", "required_dose_g"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Number of ampoules", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Number of ampoules required:
", "minValue": "number_of_ampoules", "maxValue": "number_of_ampoules", "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"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": false, "typeendtoleave": false, "startpassword": "", "autoSubmit": false, "allowAttemptDownload": true, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": true, "intro": "", "end_message": "Fantastic! You've practiced your drug calculations - doing so frequently for short times is an excellent strategy for success.
", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "reviewshowadvice": true}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Anja Komatar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/34940/"}], "extensions": [], "custom_part_types": [], "resources": []}