Remember the scene in “Harry Potter and the Chamber of Secrets” when Harry writes in what he thinks is a blank book, and Tom Riddle’s responses to his messages appear (magically!) on the page?

Taking a page, so to speak, from J.K. Rowling’s book, a team of chemical engineers at Monash University in Australia has created a new means of testing and documenting people’s blood types that works much like Tom Riddle’s diary.

Reporting in the journal Angewandte Chemie, the engineers explain their process of developing an easy-to-use, paper-based testing system that literally spells out a person’s blood type. Portions of the paper shaped like the letters A, B, and O (more on that in a moment) representing the blood types and like a plus sign (again, more in a moment) representing rhesus factor D (RhD) are treated with antibodies to which the blood sample reacts. The rest of the paper is coated to prevent its absorbing blood.

If the section shaped like the A reacts to the antibodies there, the letter A appears in red, indicating that the blood is type A. The test works the same way for type B blood; if both the A and the B turn red, it’s type AB. The indicator for type O blood is a bit more complicated, the paper explains, as type O blood doesn’t respond to antibodies. When that’s the blood type, a big X layered over a pre-printed red letter O turns red if the blood type is A, B or AB, crossing out the O. But if the sample is type O, the X fades to white after the paper’s rinsed with a saline wash, leaving the pre-printed O to indicate that blood type.

(Wei Shen, Monash University, Clayton (Australia))

The rhesus factor D tests work in similar fashion, with only the horizontal line remaining red (like a minus sign) if the blood is RhD negative and both the horizontal and vertical lines staying red to form a plus sign if it’s RhD positive.

Led by Wei Shen, an associate professor of chemical engineering at Monash, the team used their invention to test 99 blood samples representing all eight possible combinations of blood type and RhD status. The test proved accurate when the findings were compared to those of standard (and more complicated) laboratory blood-typing tests, leading the researchers to conclude that their device, which they note is relatively inexpensive and requires no particular equipment or expertise, could be useful in real life.

As the article notes, “Correct typing of human blood is extremely important in blood transfusion and in events of medical emergency.” Of course, that’s the main reason this research matters. But it’s also just really, really cool.