HDRUK / CaRROT-CDM

MIT License
7 stars 2 forks source link

Implement the DEATH table #152

Open calmacx opened 2 years ago

calmacx commented 2 years ago

https://hdruk.github.io/CaRROT-Docs/CaRROT-CDM/CommonDataModel/

Steps to reproduce...

  1. ssh into the test-link calum@20.XXXXXX
  2. sudo -s; su - bcos_srv; datasettool2 export-form DEATH --database bclink
  3. extract from output
  4. create csv for these output in git add -f export-DEATH.csv
  5. use helper function to create new destination field templates
    $ carrot generate cdm death 5.3.1
    self.person_id = DestinationField(dtype="Integer", required=False , pk=True)
    self.death_date = DestinationField(dtype="Date", required=False )
    self.death_datetime = DestinationField(dtype="Timestamp", required=False )
    self.death_type_concept_id = DestinationField(dtype="Integer", required=False )
    self.cause_concept_id = DestinationField(dtype="Integer", required=False )
    self.cause_source_value = DestinationField(dtype="Text50", required=False )
    self.cause_source_concept_id = DestinationField(dtype="Integer", required=False )
  6. create cdm/objects/versions/v5_3_1/death.py
  7. update cdm/objects/versions/v5_3_1/__init__.py
  8. update cdm/decorators.py