Closed teslajoy closed 6 months ago
Citation for publication reference https://build.fhir.org/citation.html possibly only need Citation, CitationCitedArtifact, and CitationCitedArtifactWebLocation example:
from fhir.resources.citation import Citation, CitationCitedArtifact, CitationCitedArtifactWebLocation
cit = CitationCitedArtifactWebLocation(**{'resource_type':'CitationCitedArtifactWebLocation', 'id': "1234", "classifier":[{
"coding" : [{
"system" : "http://hl7.org/fhir/artifact-url-classifier",
"code" : "doi-based",
"display" : "DOI Based"
}]
}], "url" : "https://doi.org/00.0000/123345"})
citation = Citation(**{ "id": "18426954", "identifier": [{"value": "18426954", "system": "https://pubmed.ncbi.nlm.nih.gov/"}], "status": "active", "citedArtifact": CitationCitedArtifact(**{"webLocation": [cit]})})
citation.json()
# {"resourceType":"Citation","id":"18426954","identifier":[{"system":"https://pubmed.ncbi.nlm.nih.gov/","value":"18426954"}],"status":"active","citedArtifact":{"webLocation":[{"id":"1234","classifier":[{"coding":[{"system":"http://hl7.org/fhir/artifact-url-classifier","code":"doi-based","display":"DOI Based"}]}],"url":"https://doi.org/00.0000/123345"}]}}