本文整理汇总了C++中Question::setOptions方法的典型用法代码示例。如果您正苦于以下问题:C++ Question::setOptions方法的具体用法?C++ Question::setOptions怎么用?C++ Question::setOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question::setOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Antidote
Deferoxamine::Deferoxamine(double age, double height, double weight) : Antidote(age, height, weight) {
string a = "Deferoxamine (iron toxicity) Antidote Algorithm ",
b = string("For the treatment of acute iron toxicity. ") + FDA + "\n\n",
c = "\n (Mills KC, 1994) (Anderson, 1994) (Novartis, 2011)";
insertToMap("ageLessThanThree", new Question(a + b + "Safety and effectiveness in pediatric patients under the age of " +
"3 years have not been established." + c));
string *defOptions = new string[2];
defOptions[0] = "CV shock";
defOptions[1] = "No CV complications";
Question *isPatientCVShock = new Question("Is this patient in cardiovascular (CV) shock?");
isPatientCVShock->setOptions(defOptions, 2);
insertToMap("isPatientCVShock?", isPatientCVShock);
insertToMap("give1GramIV", new Question(a + b + "Give 1gram IV every 4-8 hours if needed up to 6grams in 24 hours." + c));
insertToMap("giveIVUpTo1", new Question(a + b + "Give " + toStr(weightkg * 40) + " mg to 1000mg IV every 4-8 hours if needed, up to " +
"6 grams in 24 hours." + c));
insertToMap("giveIVMore", new Question(a + b + "Give " + toStr(weightkg * 40) + " mg to " + toStr(weightkg * 90) + " mg IV every 4-8 hours if needed," +
"up to 6 grams in 24 hours." + c));
insertToMap("give1GramIM", new Question(a + b + "Give 1gram IM every 4-8 hours if needed up to 6grams in 24 hours." + c));
insertToMap("giveIMUpTo1", new Question(a + b + "Give " + toStr(weightkg * 40) + " mg to 1000mg IM every 4-8 hours if needed, up to " +
"6 grams in 24 hours." + c));
insertToMap("giveIMMore", new Question(a + b + "Give " + toStr(weightkg * 40) + " mg to " + toStr(weightkg * 90) + " mg IM every 4-8 hours if needed, " +
"up to 6 grams in 24 hours." + c));
insertToMap("giveIV1Gram", new Question(a + b + "Initially, 1 g IV. Follow with 500 mg IM every 4 hours for 2 doses, " +
"then 500 mg IM every 4 to 12 hours if needed up to a maximum of 6 grams " +
"in 24 hours." + c));
insertToMap("giveIM1Gram", new Question(a + b + "Initially, 1 g IM. Follow with 500 mg IM every 4 hours for 2 doses, " +
"then 500 mg IM every 4 to 12 hours if needed up to a maximum of 6 grams " +
"in 24 hours." + c));
}
示例2: Antidote
CrotalidaeOvine::CrotalidaeOvine(double age, double height, double weight) : Antidote(age, height, weight) {
string a = "Crotalidae (pit viper) Antivenin Algorithm\n",
b = string("For the treatment of Crotalidae or pit viper envenomation. ") + FDA + "\n\n",
c = " (Protherics Inc., 2008)";
string stringInfantsChildren = b + " Dosing for infants and children:\n\n" +
"The dose of antivenin to be administered to infants and children is expected to be the same. " +
"Initially 4-6 vials of crotalidae antivenin ovine should be administered at a rate " +
"of 25-50 ml/hr for the first 10 minutes with careful observation of any signs of allergic " +
"reaction. If no signs exist, increase the rate to 250ml/hr. After administration of " +
"antivenin, observe for 1 hour. If control of envenomation syndrome is not achieved, another " +
"vials of antivenin may be administered until symptoms have resolved. Additional doses of 2 vials " +
"every 6 hours for up to 18 hours as needed. To date no dose over 18 vials has been used." + c;
string stringAdolescentAdult = b + " Dosing for adolescents and adults\n\n" +
"Initially 4-6 vials of crotalidae antivenin ovine should be administered at a rate " +
"of 25-50 ml/hr for the first 10 minutes with careful observation of any signs of allergic " +
"reaction. If no signs exist, increase the rate to 250ml/hr. After administration of " +
"antivenin, observe for 1 hour. If control of envenomation syndrome is not achieved, another " +
"vials of antivenin may be administered until symptoms have resolved. Additional doses of 2 vials " +
"every 6 hours for up to 18 hours as needed. To date no dose over 18 vials has been used." + c;
string reconsider = string("Please re-consider the use of crotalidae antiventin (ovine) as the equine ") +
"derived antidote is no longer available in the U.S.";
string *antiveninOptions = new string[2];
antiveninOptions[0] = "Proceed";
antiveninOptions[1] = "Exit";
string stringProceedOrExit = string("This product is an ovine (sheep) derivative. ") +
"Patients allergic to ovine products may have a severe reaction. " +
"It is recommended that you proceed with Antivenin Crotalidae Ovine therapy " +
"if the wound is life or limb threatening and provide care for anaphylaxis " +
"if necessary." + c;
Question *InfantsChildren = new Question(stringInfantsChildren);
Question *AdolescentAdult = new Question(stringAdolescentAdult);
Question *ProceedOrExit = new Question(stringProceedOrExit);
Question *Exit = new Question("");
ProceedOrExit->setOptions(antiveninOptions, 2);
prompts.insert(strQuestionMapPair("InfantsChildren", InfantsChildren));
prompts.insert(strQuestionMapPair("AdolescentAdult", AdolescentAdult));
prompts.insert(strQuestionMapPair("ProceedOrExit", ProceedOrExit));
prompts.insert(strQuestionMapPair("Exit", Exit));
}
示例3: Antidote
BlackWidow::BlackWidow(double age, double height, double weight) : Antidote(age, height, weight) {
string a = "Black Widow envenomation Algorithm.\n",
b = string("For the treatment of Black Widow (Latrodectus mactans) envenomation. ") + FDA + "\n\n",
c = "\n(Merck & Co., Inc. , 2014)";
string stringSystemicReaction = string(" As with any administration of serum products, support for ") +
"systemic reaction should be made ready prior to administration";
string stringSerumSickness = string(" Patients should be observed for serum sickness for an average ") +
"of 8 to 12 days following administration of antivenin.";
string stringNeonate = a + b + string("Safety and efficacy has not been established in neonates. ") +
"Please consult neonatologist for dosing instructions.";
string stringInfantChildren = a + b +
string("Prior to therapeutic administration a skin test should be performed ") +
"to determine sensitivity to antivenin serum. Inject a 1:10 dilution of " +
"antivenin serum intradermally. If there is no reaction after 10 minutes, " +
"proceed with antivenin administration.\n\nAntivenin administration in children:\n\n" +
"Intravenous administration is preferred method in children. Administer " +
"entire reconstituted vial (2.5 ml) of antivenin in 10ml to 50ml of Normal Saline " +
"over 15 minutes. Symptoms should subside in 1 to 3 hours.";
string stringAdolescent = a + b +
string("Prior to therapeutic administration a skin test should be performed ") +
"to determine sensitivity to antivenin serum. Inject a 1:10 dilution of " +
"antivenin serum intradermally. If there is no reaction after 10 minutes, " +
"proceed with antivenin administration.\n\nAntivenin administration in adolescents:\n\n" +
"Intravenous administration is preferred method in children. Administer " +
"entire reconstituted vial (2.5 ml) of antivenin in 10ml to 50ml of Normal Saline " +
"over 15 minutes. Symptoms should subside in 1 to 3 hours.";
string stringElderly = a + b +
string("Prior to therapeutic administration a skin test should be performed ") +
"to determine sensitivity to antivenin serum. Inject a 1:10 dilution of " +
"antivenin serum intradermally. If there is no reaction after 10 minutes, " +
"proceed with antivenin administration.\n\nAntivenin administration in adolescents:\n\n" +
"Intravenous administration is preferred method in the elderly. Administer " +
"entire reconstituted vial (2.5 ml) of antivenin in 10ml to 50ml of Normal Saline " +
"over 15 minutes. Symptoms should subside in 1 to 3 hours.";
string stringAdultNatural = a + b +
string("For a healthy patient aged 16 to 60, it is recommended that the patient not receive ") +
"antivenin serum and only pain symptoms should be treated. Healthly patients aged " +
"16 to 60 should receive antivenin only when envenomation symptoms are moderate to severe.";
string stringAdult = a + b +
string("Prior to therapeutic administration a skin test should be performed ") +
"to determine sensitivity to antivenin serum. Inject a 1:10 dilution of " +
"antivenin serum intradermally. If there is no reaction after 10 minutes, " +
"proceed with antivenin administration.\n\n" +
"Intravenous administration adults: " +
"Administer entire reconstituted vial (2.5 ml) of antivenin in 10ml to 50ml of " +
"Normal Saline over 15 minutes. Symptoms should subside in 1 to 3 hours. " +
"Intramuscular administration adults: " +
"Reconstitute antivenin vial with diluent supplied in kit. Administer " +
"intramuscularly to the anterolateral thigh. Placement of dose allows tourniquet " +
"to be applied in the event of systemic reaction.";
string stringSeverity = "Describe the severity of bite. ";
string *antiveninOptions = new string[2];
antiveninOptions[0] = "Severe";
antiveninOptions[1] = "Mild";
Question *severity = new Question(stringSeverity);
severity->setType("options");
severity->setOptions(antiveninOptions, 2);
prompts.insert(strQuestionMapPair("severity", severity));
Question *age0 = new Question(stringNeonate + stringSystemicReaction + stringSerumSickness + c);
prompts.insert(strQuestionMapPair("age0", age0));
Question *ageLessThen12 = new Question(stringInfantChildren + stringSystemicReaction + stringSerumSickness + c);
prompts.insert(strQuestionMapPair("ageLessThen12", ageLessThen12));
Question *age12To16 = new Question(stringAdolescent + stringSystemicReaction + stringSerumSickness + c);
prompts.insert(strQuestionMapPair("age12To16", age12To16));
Question *ageGreaterThen60 = new Question(b + stringElderly + stringSystemicReaction + stringSerumSickness + c);
prompts.insert(strQuestionMapPair("ageGreaterThen60", ageGreaterThen60));
Question *age16To60Severe = new Question(stringAdult + stringSystemicReaction + stringSerumSickness + c);
prompts.insert(strQuestionMapPair("age16To60Severe", age16To60Severe));
Question *age16To60Mild = new Question(stringAdultNatural + c);
prompts.insert(strQuestionMapPair("age16To60Mild", age16To60Mild));
}