Skip to content

Instantly share code, notes, and snippets.

@tomstuart
Forked from richardjpope/free-prescriptions.feature
Last active August 29, 2015 14:24
Show Gist options
  • Save tomstuart/7249ad30e56c45d227da to your computer and use it in GitHub Desktop.
Save tomstuart/7249ad30e56c45d227da to your computer and use it in GitHub Desktop.

Revisions

  1. tomstuart revised this gist Jul 14, 2015. 1 changed file with 108 additions and 79 deletions.
    187 changes: 108 additions & 79 deletions free-prescriptions.feature
    Original file line number Diff line number Diff line change
    @@ -1,82 +1,111 @@
    #http://www.nhs.uk/NHSEngland/Healthcosts/Pages/Prescriptioncosts.aspx

    Given a user is dispensed a prescription
    When their age is >= 60
    Then the prescription cost should be 0
    Given a user who is 60 or older
    When they collect a prescription
    Then it should be free

    Given a user is dispensed a prescription
    And their age is < 16
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When their age is >= 16 and <= 18 and they are in full-time education
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they are pregnant
    And have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have had a baby in the past 12 months
    And have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a specified medical condition
    And they have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a continuing physical disability that prevents them from going out without help from another person
    And they have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a War Pension exemption certificate
    And the prescription is for their accepted disability
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they are an inpatient
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner have an NHS tax credit exemption certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner have a valid HC2 certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the benefit "Income Support"
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the "Income-based Jobseeker’s Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the "Income-related Employment and Support Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the "Pension Credit Guarantee Credit" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the "Universal Credit" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they live permanently in a care home
    And hold savings, investments or property (not counting the place where they live) of £23,250 or less
    And their income is <= their requirements, or greater by no more than half the current English prescription charge
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they do not live permanently in a care home
    And hold savings, investments or property (not counting the place where they live) of £16,000 or less
    And their income is <= their requirements, or greater by no more than half the current English prescription charge
    Then the prescription cost should be 0
    Given a user who is younger than 16
    When they collect a prescription
    Then it should be free

    Given a user who is between 16 and 18 years old
    And is in full-time education
    When they collect a prescription
    Then it should be free

    Given a user who is pregnant
    And has a valid MedEx certificate
    When they collect a prescription
    Then it should be free

    Given a user who has given birth in the past year
    And has a valid MedEx certificate
    When they collect a prescription
    Then it should be free

    Given a user who has a specified medical condition
    And has a valid MedEx certificate
    When they collect a prescription
    Then it should be free

    Given a user who has a continuing physical disability that prevents them from going out without help from another person
    And has a valid MedEx certificate
    When they collect a prescription
    Then it should be free

    Given a user who has a War Pension exemption certificate
    And has a prescription for their accepted disability
    When they collect a prescription
    Then it should be free

    Given a user who is an inpatient
    When they collect a prescription
    Then it should be free

    Given a user who has an NHS tax credit exemption certificate
    When they collect a prescription
    Then it should be free

    Given a user whose partner has an NHS tax credit exemption certificate
    When they collect a prescription
    Then it should be free

    Given a user who has a valid HC2 certificate
    When they collect a prescription
    Then it should be free

    Given a user whose partner has a valid HC2 certificate
    When they collect a prescription
    Then it should be free

    Given a user who receives Income Support
    When they collect a prescription
    Then it should be free

    Given a user whose partner receives Income Support
    When they collect a prescription
    Then it should be free

    Given a user who receives Income-based Jobseeker’s Allowance
    When they collect a prescription
    Then it should be free

    Given a user whose partner receives Income-based Jobseeker’s Allowance
    When they collect a prescription
    Then it should be free

    Given a user who receives Income-related Employment and Support Allowance
    When they collect a prescription
    Then it should be free

    Given a user whose partner receives Income-related Employment and Support Allowance
    When they collect a prescription
    Then it should be free

    Given a user who receives Pension Credit Guarantee Credit
    When they collect a prescription
    Then it should be free

    Given a user whose partner receives Pension Credit Guarantee Credit
    When they collect a prescription
    Then it should be free

    Given a user who receives Universal Credit
    When they collect a prescription
    Then it should be free

    Given a user whose partner receives Universal Credit
    When they collect a prescription
    Then it should be free

    Given a user who lives permanently in a care home
    And holds savings, investments or property (not counting the place where they live) of £23,250 or less
    And whose income does not exceed their requirements by half the current English prescription charge
    When they collect a prescription
    Then it should be free

    Given a user who does not live permanently in a care home
    And holds savings, investments or property (not counting the place where they live) of £16,000 or less
    And whose income does not exceed their requirements by half the current English prescription charge
    When they collect a prescription
    Then it should be free
  2. @richardjpope richardjpope revised this gist Jul 14, 2015. 1 changed file with 41 additions and 10 deletions.
    51 changes: 41 additions & 10 deletions free-prescriptions.feature
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #http://www.nhs.uk/NHSEngland/Healthcosts/Pages/Prescriptioncosts.aspx

    Given a user is dispensed a prescription
    When their age is >= 60
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    And their age is < 16
    Then the prescription cost should be 0
    @@ -18,34 +18,65 @@ And have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a physical disability
    When they have had a baby in the past 12 months
    And have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a specified medical condition
    And they have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a War Pension
    When they have a continuing physical disability that prevents them from going out without help from another person
    And they have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a War Pension exemption certificate
    And the prescription is for their accepted disability
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they are an inpatient
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the benefit "Income Support"
    When they or their partner have an NHS tax credit exemption certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Income-based Jobseeker’s Allowance" benefit
    When they or their partner have a valid HC2 certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Income-related Employment and Support Allowance" benefit
    When they or their partner receive the benefit "Income Support"
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Pension Credit Guarantee Credit" benefit
    When they or their partner receive the "Income-based Jobseeker’s Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Universal Credit" benefit
    Then the prescription cost should be 0
    When they or their partner receive the "Income-related Employment and Support Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the "Pension Credit Guarantee Credit" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they or their partner receive the "Universal Credit" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they live permanently in a care home
    And hold savings, investments or property (not counting the place where they live) of £23,250 or less
    And their income is <= their requirements, or greater by no more than half the current English prescription charge
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they do not live permanently in a care home
    And hold savings, investments or property (not counting the place where they live) of £16,000 or less
    And their income is <= their requirements, or greater by no more than half the current English prescription charge
    Then the prescription cost should be 0
  3. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions free-prescriptions.feature
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #http://www.nhs.uk/NHSEngland/Healthcosts/Pages/Prescriptioncosts.aspx

    Given a user is dispensed a prescription
    When their age is >= 60
    Then the prescription cost should be 0
    @@ -46,6 +48,4 @@ Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Universal Credit" benefit
    Then the prescription cost should be 0
    #http://www.nhs.uk/NHSEngland/Healthcosts/Pages/Prescriptioncosts.aspx
    Then the prescription cost should be 0
  4. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion free-prescriptions.feature
    Original file line number Diff line number Diff line change
    @@ -46,4 +46,6 @@ Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Universal Credit" benefit
    Then the prescription cost should be 0
    Then the prescription cost should be 0
    #http://www.nhs.uk/NHSEngland/Healthcosts/Pages/Prescriptioncosts.aspx
  5. @richardjpope richardjpope renamed this gist Jul 13, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @richardjpope richardjpope renamed this gist Jul 13, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. @richardjpope richardjpope revised this gist Jul 13, 2015. No changes.
  8. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 11 additions and 6 deletions.
    17 changes: 11 additions & 6 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    Given a user is dispensed a prescription
    And their age is >= 60
    When their age is >= 60
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    @@ -37,8 +37,13 @@ When they receive the "Income-based Jobseeker’s Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    or receive Income-related"Employment and Support Allowance"
    or "Pension Credit Guarantee Credit"
    or "Universal Credit"
    Then
    the prescription cost should be 0
    When they receive the "Income-related Employment and Support Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Pension Credit Guarantee Credit" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the "Universal Credit" benefit
    Then the prescription cost should be 0
  9. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    Given a user is dispensed a prescription
    And their age is >= 60
    And their age is >= 60
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    And their age is < 16
    And their age is < 16
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
  10. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ And their age is >= 60
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    And their age is < 16
    And their age is < 16
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
  11. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    Given a user is dispensed a prescription
    When their age is >= 60
    And their age is >= 60
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    When their age is < 16
    And their age is < 16
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    @@ -33,7 +33,7 @@ When they receive the benefit "Income Support"
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the benefit "Income-based Jobseeker’s Allowance"
    When they receive the "Income-based Jobseeker’s Allowance" benefit
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
  12. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 34 additions and 9 deletions.
    43 changes: 34 additions & 9 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,40 @@ When their age is >= 60
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    When their age is < 16
    Then the prescription cost should be 0
    or their age is >= 16 and <= 18 and in full-time education
    or they are pregnant and have a valid MedEx certificate
    or have a physical disability and have a valid MedEx certificate
    or have a War Pension
    or are an inpatient
    or receive "Income Support"
    or Income-based "Jobseeker’s Allowance"
    When their age is < 16
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When their age is >= 16 and <= 18 and they are in full-time education
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they are pregnant
    And have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a physical disability
    And they have a valid MedEx certificate
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they have a War Pension
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they are an inpatient
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the benefit "Income Support"
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    When they receive the benefit "Income-based Jobseeker’s Allowance"
    Then the prescription cost should be 0
    Given a user is dispensed a prescription
    or receive Income-related"Employment and Support Allowance"
    or "Pension Credit Guarantee Credit"
    or "Universal Credit"
  13. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    Given a user is dispensed a prescription
    When their age is >= 60
    Then
    the prescription cost should be 0
    Then the prescription cost should be 0

    Given a user is dispensed a prescription
    When their age is < 16
  14. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,11 @@
    Given a user is dispensed a prescription
    When their age is >= 60
    or their age is < 16
    Then
    the prescription cost should be 0

    Given a user is dispensed a prescription
    When their age is < 16
    Then the prescription cost should be 0
    or their age is >= 16 and <= 18 and in full-time education
    or they are pregnant and have a valid MedEx certificate
    or have a physical disability and have a valid MedEx certificate
  15. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 12 additions and 11 deletions.
    23 changes: 12 additions & 11 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    Given a user is dispensed a prescription
    When their age is >= 60 Or their age is < 16
    Or their age is >= 16 and <= 18 and in full-time education
    Or they are pregnant and have a valid MedEx certificate
    Or have a physical disability and have a valid MedEx certificate
    Or have a War Pension
    Or are an inpatient
    Or receive "Income Support"
    Or Income-based "Jobseeker’s Allowance"
    Or receive Income-related"Employment and Support Allowance"
    Or "Pension Credit Guarantee Credit"
    Or "Universal Credit"
    When their age is >= 60
    or their age is < 16
    or their age is >= 16 and <= 18 and in full-time education
    or they are pregnant and have a valid MedEx certificate
    or have a physical disability and have a valid MedEx certificate
    or have a War Pension
    or are an inpatient
    or receive "Income Support"
    or Income-based "Jobseeker’s Allowance"
    or receive Income-related"Employment and Support Allowance"
    or "Pension Credit Guarantee Credit"
    or "Universal Credit"
    Then
    the prescription cost should be 0
  16. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    Given a user is dispensed a prescription
    When their age is >= 60
    Or their age is < 16
    When their age is >= 60 Or their age is < 16
    Or their age is >= 16 and <= 18 and in full-time education
    Or they are pregnant and have a valid MedEx certificate
    Or have a physical disability and have a valid MedEx certificate
  17. @richardjpope richardjpope revised this gist Jul 13, 2015. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    Given a user is dispensed a prescription
    When their age is >= 60
    or their age is < 16
    or their age is >= 16 and <= 18 and in full-time education
    or they are pregnant and have a valid MedEx certificate
    or have a physical disability and have a valid MedEx certificate
    or have a War Pension
    or are an inpatient
    or receive "Income Support"
    or Income-based "Jobseeker’s Allowance"
    or receive Income-related"Employment and Support Allowance"
    or "Pension Credit Guarantee Credit"
    or "Universal Credit"
    Or their age is < 16
    Or their age is >= 16 and <= 18 and in full-time education
    Or they are pregnant and have a valid MedEx certificate
    Or have a physical disability and have a valid MedEx certificate
    Or have a War Pension
    Or are an inpatient
    Or receive "Income Support"
    Or Income-based "Jobseeker’s Allowance"
    Or receive Income-related"Employment and Support Allowance"
    Or "Pension Credit Guarantee Credit"
    Or "Universal Credit"
    Then
    the prescription cost should be 0
  18. @richardjpope richardjpope created this gist Jul 13, 2015.
    15 changes: 15 additions & 0 deletions gistfile1.feature
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    Given a user is dispensed a prescription
    When their age is >= 60
    or their age is < 16
    or their age is >= 16 and <= 18 and in full-time education
    or they are pregnant and have a valid MedEx certificate
    or have a physical disability and have a valid MedEx certificate
    or have a War Pension
    or are an inpatient
    or receive "Income Support"
    or Income-based "Jobseeker’s Allowance"
    or receive Income-related"Employment and Support Allowance"
    or "Pension Credit Guarantee Credit"
    or "Universal Credit"
    Then
    the prescription cost should be 0