Casualty: I co-wrote the gangs storyline
Jade (Dominique Jackson) and her boyfriend Stevie (Franz Drameh)
We met up with the production team to thrash out what we wanted this story to be, then the writers and script editors sat down to come up with an overall story 'arc' for the three episodes.
I've been asked if real-life events inspired this story. Yes, in that EDs are on the front line, dealing with the effects of youth-on-youth violence.
As part of our research, Rob Jackson, nurse clinician at the Royal Liverpool Hospital, showed the writers and some of the Casualty team what this damage really looks like in an unflinching presentation about situations from his ED.
Obviously I read a lot of articles and other materials to get as much background as I could.
But I think our starting point was even more basic: what's going on in a young person's life that makes using a knife or gun seem like a real choice?
To get our heads around that we also met with ED staff at Kings College Hospital in south London (where there was a fight between two gangs days before our visit).
We also talked to police detectives, community liaison officers and community workers who support young people.
Their insights helped us to build our story around Stevie, who's on the very edges of a gang through his half-brother Kris.
Because 'gang member' is a label - all kinds of young people are affected by gang culture, whether they want it in their lives or not.
Watch the fallout from the shooting
The best thing, apart from getting to write the second episode of this three-parter, was seeing how much everyone on the Casualty team cared about making this story real.
It was great to have so much support, long before one word got written. It was hard work and a lot of fun piecing it together.
And frustrating sometimes, when a scene you really want to write just works better in another episode.
I'm thinking of a moment between Kris and Stevie that's in part three. Things did change as we wrote and the script editors, Emily Groves and David Davis, had to keep a clear view across all three episodes.
Talking to them made me realise this moment should happen after my episode. You're constantly talking to your script editor about all kinds of details, and to make sure the characters act and talk consistently.
I realised early during the research that I wanted my episode to explore how girls get treated when they come into contact with gangs.
Jade's a 'real' girlfriend - a so-called 'wifey' - and I wanted to know what that could mean for her and for girls who aren't seen this way.
That led eventually to the issue of rape. Sadly, it is sometimes used by gangs to punish or intimidate - that is, as a weapon.
So Jade is another victim of Stevie's decision to fire a gun. Her scenes after the rape were difficult to write, but also satisfying because of the bond between her and Tess.
Jade and her friend Tia live in the same world with similar pressures, but they react differently.
By the end of the episode Jade's the one deciding what she wants - a small but important step. I hope it comes through in the story, that there's always a choice.
Andrea Page is a writer on Casualty.
For further programme times, please see the episode guide.
Comments made by writers on the BBC TV blog are their own opinions and not necessarily those of the BBC.