I have some info (and think I misunderstood part of your question).
First you need to download the Greenbone Community Feed (containing the CVEs and VTs)
The CVE information is then available as XML files in /path/to/downloaded/feed/scap-data/
Now- to see what patches are installed- that is in the vulnerability tests (VTs).
The source code for these is also included in the downloaded feed at /path/to/downloaded/feed/plugins/ as NASL files.
And there is some starter documentation on NASL here: VT Development
Edit to add: quick question, what is your goal? It might be easier to point you in the right direction if we know what you are trying to accomplish.