CSL JSON export: populate PMID field from Zotero extra field
For the following zotero JSON data notice that Zotero has encoded the PubMed ID in the `extra` field with `PMID: 1`.
```json
[
{
"key": "SLTYU46W",
"itemType": "journalArticle",
"title": "Formate assay in body fluids: application in methanol poisoning",
"DOI": "10.1016/0006-2944(75)90147-7",
"extra": "PMID: 1",
"libraryCatalog": "PubMed",
}
]
```
Exporting this Zotero JSON to CSL JSON using translation-server, results in the following:
```json
[
{
"key": "SLTYU46W",
"itemType": "journalArticle",
"title": "Formate assay in body fluids: application in methanol poisoning",
"DOI": "10.1016/0006-2944(75)90147-7",
"extra": "PMID: 1",
"libraryCatalog": "PubMed"
}
]
```
Notice that `PMID: 1` is still in the extra field, despite the [CSL JSON schema](https://github.com/citation-style-language/schema/blob/f01ba9c5ec2055e381a38598919a379255c496c5/csl-data.json#L380-L382) supporting a `PMID` field. We should also see if this issue affects PMCIDs as well.
It seems that this case should be handled by the extraToCSL function proposed (or maybe implemented) by @dstillman at https://github.com/zotero/zotero/pull/1451#issuecomment-369750809.
```json
[
{
"key": "SLTYU46W",
"itemType": "journalArticle",
"title": "Formate assay in body fluids: application in methanol poisoning",
"DOI": "10.1016/0006-2944(75)90147-7",
"extra": "PMID: 1",
"libraryCatalog": "PubMed",
}
]
```
Exporting this Zotero JSON to CSL JSON using translation-server, results in the following:
```json
[
{
"key": "SLTYU46W",
"itemType": "journalArticle",
"title": "Formate assay in body fluids: application in methanol poisoning",
"DOI": "10.1016/0006-2944(75)90147-7",
"extra": "PMID: 1",
"libraryCatalog": "PubMed"
}
]
```
Notice that `PMID: 1` is still in the extra field, despite the [CSL JSON schema](https://github.com/citation-style-language/schema/blob/f01ba9c5ec2055e381a38598919a379255c496c5/csl-data.json#L380-L382) supporting a `PMID` field. We should also see if this issue affects PMCIDs as well.
It seems that this case should be handled by the extraToCSL function proposed (or maybe implemented) by @dstillman at https://github.com/zotero/zotero/pull/1451#issuecomment-369750809.
In any case, this isn't really within scope for Zotero. The Extra "cheater syntax" is primarily a feature of citeproc-js, and while we look in Extra for a couple things (e.g., when looking for DOIs) within Zotero itself, it's not meant to be a replacement for real fields, and I don't want to add more hacks for this. We're almost ready to add new fields, and when we do, we'll migrate Extra values to the new fields, at which point we'll be able to pass these through properly. Until then, consumers of CSL-JSON that uses these will need to parse them the same as citeproc-js.