At the time this film was in production, only four of the eventual seven books in the series had been published. J.K. Rowling was retained as a consultant on the film, not only to ensure consistency with the first book, but also to avoid conflicts with her vision for the later entries.
Harry Potter and the Sorcerer’s Stone (2001)
That is how you make an adaptation. Use the creator of the source to keep things in check.
take note Columbus and Shyamalan