<?xml version="1.0" encoding="UTF-8"?>
<!--
	This is an XML file so certain characters need special treatment:
		For ampersand, use &amp;
		For single quote, use &quot;
		For left angle bracket, use &lt;
		For right angle bracket, use &rt;
	Leading and trailing whitespace may be trimmed.
-->
<riskDisplay>

  <!-- one for each tab that shows in the animation. The id is used in references below -->
  <tabs>
    <tab id="presets" label="Settings"/>
    
    <!-- Risks tab is commented out -->
    <tab id="risks" label="Risks"/>
    <tab id="benefits" label="Benefits"/>

    <!-- not sure about the chart formats yet so ignore these for now...-->
    <tab id="bar" label="Risk Charts"/>
    <tab id="pie" label="Pie Charts"/>
    <tab id="icons" label="Smileys"/>
  </tabs>
  
  <presets>

    <!-- default label texts -->
    <medication>Intervention Risks</medication>
    <condition>Condition</condition>
    <P0Text>Chance that {B} occurs without {A}</P0Text>
    <P1Text>Chance that {B} occurs with {A}</P1Text>
    
    <!-- presets selected from combobox items labelled by attribute 'A' concatenated with attribute 'tab' -->
    
   <!-- item 1 Statins benefits -->
    <preset title="What is Your risk?" label="Statins" tab="benefits" A="Statins" B="heart attack or stroke in 10 years" P0="0.1" P1="0.08">
      <!-- label texts which override the default texts in this preset only here -->
      <medication>Treatment</medication>
      <condition>to avoid</condition>
      <P0Text>Chance that {B} occurs without {A}</P0Text>
      <P1Text>Chance that {B} occurs with {A}</P1Text>
    </preset>
    
     <!-- item 2 VIOXX benefits -->
    <preset title="The VIGOR trial" label="Vioxx" tab="benefits" A="Vioxx" B="GI events" P0="0.08" P1="0.04">
      <!-- label texts which override the default texts in this preset only -->
      <medication>Treatment</medication>
      <condition>to avoid</condition>
      <P0Text>Chance that {B} occurs without {A}</P0Text>
      <P1Text>Chance that {B} occurs with {A}</P1Text>
    </preset>
    
      <!-- item 3 VIOXX risks -->
    <preset title="The VIGOR trial" label="Vioxx" tab="risks" A="Vioxx" B="MI" P0="0.01" P1="0.04">
       <medication>Treatment</medication>
      <condition>to avoid</condition>
      <P0Text>Chance that {B} occurs without {A}</P0Text>
      <P1Text>Chance that {B} occurs with {A}</P1Text>
    </preset>
    
  </presets>
  
  <!--
      List of statements. These are selected by their attributes 
      - type 
        - relative
	- absolute
	- nnt 
      - format
        - chance_pc
	- chance_nf
        - population_pc
	- population_nf
      - frame
        - negative
	- positive

      In case of repeats, all statements matching an attribute set will show.
      Valid curly bracket formats are {A}, {B} or any algebraic expression
      involving P0, P1, D (D = the natural frequency denominator). 
      
      To get a suitable precision you can round(an expression).
    -->

  <!-- statements which may appear on the risks tab -->
  <statements tab="risks">
    <statement type="relative" target="chance" format="pc" frame="negative">
      {A} reduces your chance of getting {B} by {round((1 - P1/P0) * 100)} %.
    </statement>
    
    <statement type="relative" target="chance" format="nf" frame="negative">
      {A} reduces your chance of getting {B} by {round((1 - P1/P0) * D )} in {D}.
    </statement>
    
    <statement type="relative" target="chance" format="pc" frame="positive">				
      {A} increases your chance of avoiding {B} by {round((P0 - P1)*100/(1 - P0))} %.
    </statement>
    
    <statement type="relative" target="chance" format="nf" frame="positive">				
      {A} increases your chance of avoiding {B} by {round((P0 - P1)*D/(1 - P0))} in {D}.
    </statement>
    
    <statement type="relative" target="population" format="pc" frame="negative">				
      By taking {A},  {round((1 - P1/P0) * 100)} % fewer people will experience {B}.
    </statement>
    
    <statement type="relative" target="population" format="nf" frame="negative">				
      By taking {A},  {round((1 - P1/P0) * D)} fewer people out of {D} will experience {B}.
    </statement>
    
    <statement type="relative" target="population" format="pc" frame="positive">				
      By taking {A},  {round((P0 - P1)*100/(1 - P0))} % more people will avoid {B}.
    </statement>
    
    <statement type="relative" target="population" format="nf" frame="positive">				
      By taking {A},  {round((P0 - P1)*D/(1 - P0))} more people out of {D} will avoid {B}.
    </statement>
    
    <statement type="absolute" target="chance" format="pc" frame="negative">				
      Your chance of developing {B} without {A} is {round(P0 * 1000)/10} %, which is reduced to {round(P1 * 1000)/10} % with {A}.
    </statement>
    
    <statement type="absolute" target="chance" format="nf" frame="negative">				
      Your chance of developing {B} without {A} is {round(P0 * D)} in {D}, which is reduced to {round(P1 * D)} in {D} with {A}.
    </statement>
    
    <statement type="absolute" target="chance" format="pc" frame="positive">				
      Your chance of avoiding {B} without {A} is {round((1-P0) * 1000)/10} %, which is increased to {round((1-P1) * 1000)/10} % with {A}.
    </statement>
    
    <statement type="absolute" target="chance" format="nf" frame="positive">				
      Your chance of avoiding {B} without {A} is {round((1-P0) * D)} in {D}, which is increased to {round((1-P1) * D)} in {D} with {A}.
    </statement>
    
    <statement type="absolute" target="population" format="pc" frame="negative">				
      {round(P0 * 1000)/10} % of people like you will develop {B} without {A}, while only {round(P1 * 1000)/10} % will develop {B} with {A}.
    </statement>
    
    <statement type="absolute" target="population" format="pc" frame="positive">				
      {round((1-P0)*1000)/10} percent of people like you will be free of {B} without taking {A}, while {round((1-P1)*1000)/10} percent of people will be free of {B} with {A}.
    </statement>
    
    <statement type="absolute" target="population" format="nf" frame="negative">				
      {round(P0 * D)} out of {D} people  like you will develop {B} without taking {A}, while {round(P1 * D)} out of {D}  will develop {B} with {A}. 
    </statement>
    
    <statement type="absolute" target="population" format="nf" frame="positive">				
      {round((1 - P0) * D)} out of {D} people  like you will be free of {B} without taking {A}, while {round((1 - P1) * D)} out of {D}  like you will develop {B} despite having taken {A}.
    </statement>
    
    <statement type="nnt">				
      In order to save one person from getting {B}, we would need to treat {round(1/(P0 - P1))} people like you with {A}.
    </statement>
    
  </statements>

  <!-- statements which may appear on the benefits tab -->
  <statements tab="benefits">
   <statement type="relative" target="chance" format="pc" frame="negative">
      {A} reduces your chance of getting {B} by {round((1 - P1/P0) * 100)} %.
    </statement>
    
    <statement type="relative" target="chance" format="nf" frame="negative">
      {A} reduces your chance of getting {B} by {round((1 - P1/P0) * D )} in {D}.
    </statement>
    
    <statement type="relative" target="chance" format="pc" frame="positive">				
      {A} increases your chance of avoiding {B} by {round((P0 - P1)*100/(1 - P0))} %.
    </statement>
    
    <statement type="relative" target="chance" format="nf" frame="positive">				
      {A} increases your chance of avoiding {B} by {round((P0 - P1)*D/(1 - P0))} in {D}.
    </statement>
    
    <statement type="relative" target="population" format="pc" frame="negative">				
      By taking {A},  {round((1 - P1/P0) * 100)} % fewer people  like you will experience {B}.
    </statement>
    
    <statement type="relative" target="population" format="nf" frame="negative">				
      By taking {A},  {round((1 - P1/P0) * D)} fewer out of {D} people like you will experience {B}.
    </statement>
    
    <statement type="relative" target="population" format="pc" frame="positive">				
      By taking {A},  {round((P0 - P1)*100/(1 - P0))} % more people  like you will avoid {B}.
    </statement>
    
    <statement type="relative" target="population" format="nf" frame="positive">				
      By taking {A},  {round((P0 - P1)*D/(1 - P0))} more  out of {D} people like you will avoid {B}.
    </statement>
    
    <statement type="absolute" target="chance" format="pc" frame="negative">				
      Your chance of developing {B} without {A} is {round(P0 * 1000)/10} %, which is reduced to {round(P1 * 1000)/10} % with {A}.
    </statement>
    
    <statement type="absolute" target="chance" format="nf" frame="negative">				
      Your chance of developing {B} without {A} is {round(P0 * D)} in {D}, which is reduced to {round(P1 * D)} in {D} with {A}.
    </statement>
    
    <statement type="absolute" target="chance" format="pc" frame="positive">				
      Your chance of avoiding {B} without {A} is {round((1-P0) * 1000)/10} %, which is increased to {round((1-P1) * 1000)/10} % with {A}.
    </statement>
    
    <statement type="absolute" target="chance" format="nf" frame="positive">				
       Your chance of avoiding {B} without {A} is {round((1-P0) * D)} in {D}, which is increased to {round((1-P1) * D)} in {D} with {A}.
    </statement>
    
    <statement type="absolute" target="population" format="pc" frame="negative">				
      {round(P0 * 1000)/10} % of people like you will develop {B} without {A}, while only {round(P1 * 1000)/10} % will develop {B} with {A}.
    </statement>
    
    <statement type="absolute" target="population" format="pc" frame="positive">				
      {round((1-P0)*1000)/10} percent of people like you will be free of {B} without taking {A}, while {round((1-P1)*1000)/10} percent of people will be free of {B} with {A}.
    </statement>
    
    <statement type="absolute" target="population" format="nf" frame="negative">				
      {round(P0 * D)} out of {D} people like you will develop {B} without taking {A}, while {round(P1 * D)} out of {D}  will develop {B} with {A}. 
    </statement>
    
    <statement type="absolute" target="population" format="nf" frame="positive">				
      {round((1 - P0) * D)} out of {D} people like you will be free of {B} without taking {A}, while {round((1 - P1) * D)} out of {D}  will develop {B} despite having taken {A}.
    </statement>
    
    <statement type="nnt">				
      In order to save one person from getting {B}, we would need to treat {round(1/(P0 - P1))} people like you with {A}.
    </statement>
    
  </statements>
  
</riskDisplay>
