blood_typeHealth

Mock Jutsu HOW-TO | UK

In the realm of software development, particularly within the healthcare and biotechnology sectors, the ability to generate realistic test data is paramount. The mock-jutsu library offers a robust solution for these requirements through its Health category, featuring the blood_type function. This utility is specifically designed to produce accurate representations of human blood classifications, serving as an essential tool for developers who need to simulate patient records or laboratory results without compromising sensitive personal information.

The blood_type function generates mock data based on the internationally recognised ABO blood group system combined with the Rhesus (Rh) factor. By outputting values such as A+, O-, or AB+, the library ensures that the test data adheres to clinical standards. This precision is vital when validating database schemas, testing UI components that display physiological data, or ensuring that backend logic correctly processes the various combinations of letters and symbols associated with haematological groupings.

For developers, the benefits of using mock-jutsu extend across the entire testing lifecycle. Whether you are performing manual checks via the CLI, integrating automated unit tests in Python, or conducting rigorous performance evaluations using JMeter, the blood_type function remains consistent. In a performance testing scenario, for instance, a developer might use the JMeter integration to simulate thousands of concurrent donor registrations, ensuring the system can handle high volumes of standardised health data. This multi-platform support reduces the friction often found when transitioning between different stages of the DevOps pipeline.

Beyond simple data generation, using the blood_type function within mock-jutsu helps teams avoid the legal and ethical complexities of using real-world medical data. By populating staging environments with high-fidelity mock data, engineers can identify edge cases in sorting algorithms or filtering logic early in the development cycle. Ultimately, this function empowers teams to build more resilient healthcare applications by providing a reliable, automated, and standardised way to generate one of the most fundamental pieces of clinical information used in modern medicine.

CLI Usage
mockjutsu generate blood_typemockjutsu bulk blood_type --count 10mockjutsu export blood_type --count 10 --format jsonmockjutsu export blood_type --count 10 --format csvmockjutsu export blood_type --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate blood_type --maskmockjutsu bulk blood_type --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('blood_type')jutsu.bulk('blood_type', count=10)jutsu.template(['blood_type'], count=5)# mask=True: regulation-compliant outputjutsu.generate('blood_type', mask=True)jutsu.bulk('blood_type', count=5, mask=True)
JMeter
${__mockjutsu_health(blood_type)}# JMeter Function: __mockjutsu_health# Parameter 1: blood_type# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_health(blood_type,mask)}
REST API
GET /generate/blood_type# → {"type":"blood_type","result":"...","status":"ok"}GET /bulk/blood_type?count=10POST /template {"types":["blood_type"],"count":1}# mask=true: regulation-compliant outputGET /generate/blood_type?mask=trueGET /bulk/blood_type?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages