Here is the UB-04 Patient Discharge Status Vocabulary in OMOP, and here is some education on UB-04 patient discharge status codes.
The first step is to determine what vocabulary does your source data use to code discharge status. Is it UB04 patient discharge status codes?
Second step would be to a frequency distribution of the codes in your source data – check if they match with expected values in UB04 patient discharge status vocabularies codes. Check for number of characters, are there leading zeros? If you would like automate these two steps using a tool then use USAGI here.
If your source data vocabulary matched UB04 patient discharge status - you can use this query below to get the 'concept_id’s - it is straight forward text join.
source join concept ON source.dstatus = concept.concept_code AND concept_vocabulary_id = ‘UB04 Pt dis status’ and concept.invalid_reason is null
don’t forget the invalid_reason.
If your source data vocabulary does not match UB04 patient discharge status – then USAGI will most likely offer match recommendations, i.e. your source data is not using UB-04 patient discharge status vocabulary. In that case, you may want to use source_to_concept_map to doing mapping.