---
name: Andreas
surname: Gammelgaard Damsbo
position: "MD, PhD-student"
pronouns: he/him
address: "Danish Stroke Centre, Neurology, Aarhus University Hospital"
phone: "+45 2490 3612"
www: "andreas.gdamsbo.dk"
email: "andrlr@rm.dk"
github: agdamsbo
date: "`r format(Sys.time(), '%B %Y')`"
docname: cv
output:
  vitae::awesomecv:
    page_total: true
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
library(dplyr)
library(tibble)
library(rorcid)

orc_id <- "0000-0002-7559-1154"

# Notes
# https://stackoverflow.com/questions/63067088/syntax-for-publication-list-with-full-authors
```

# About me

-   I am a medical doctor and PhD-student
-   I have a special interest in the relation betwen clinical focus on patients and data driven research
-   I also do other things, and these are also shared on this page

# Education

```{r}
library(tibble)
tribble(
  ~ Degree, ~ Year, ~ Institution, ~ Where,
  "cand.med", "2011-2018", "Aarhus University", "Aarhus, Denmark"
) %>%
  detailed_entries(Degree, Year, Institution, Where)
# ?tibble::tribble
```

# Publications

```{r}
# library(scholar)
# scholar_id <- "Y80Xqc4AAAAJ"
# l <- get_profile(scholar_id)
# scholar::get_publications(scholar_id) |> writeLines("publications.bib")
# bibliography_entries("publications.bib") %>%
#   arrange(desc(author$family), issued)
```

```{r}
library(dplyr)
library(rorcid)

# works <- rorcid::orcid_works(orc_id)[[1]]
# 
# edu <- do.call("rbind",
#   rorcid::orcid_educations(orc_id)[[1]]
# )
 
# orc_id <- "0000-0002-7559-1154"
# pubs <- orcid_citations(orcid = orc_id, put_code=NULL)
# 
# writeLines(pubs$citation, "publications.bib")
bibliography_entries("pubs.bib") %>%
  arrange(desc(author$family), issued)

## Currently not working; I think it is due to error in DOI lookup with latest article.
```
