We can have such a device from iWorx with the TA 220 for a view thousand dollars:
but the device is not open source and a big machine. Modern components are affordable and small
Key components to replace it are: the AD 8232
the ADS 1115:
And a used spirometer from iworx which can be found on ebay:
Furthermore single board computer like the orange pi 5:
And a community to build it an replace it.