BookmarkSubscribeRSS Feed
CathyVI
Pyrite | Level 9

 Hi,

 

I am working on a medical code (RxNorm) data and I am trying to read a specific data into sas with no way through. I have created  a fictitious data which is a very similar to the real data.

 

Sample raw data

 

{"userInput":{"relaSource":"MEDRT","relas":"may_treat","rxcui":"128793"},"rxclassDrugInfoList":{"rxclassDrugInfo":[{"minConcept":{"rxcui":"142439","name":"Hydrocodone Bitartrate","tty":"PIN"},

"rxclassMinConceptItem"{"classId":"D003371","className":"Cough","classType":"DISEASE"},"rela":"may_treat","relaSource":"MEDRT"},{"minConcept":{"rxcui":"142439","name":"Hydrocodone Bitartrate","tty":"PIN"},

"rxclassMinConceptItem":{"classId":"D008173","className":"Lung Diseases, Obstructive","classType":"DISEASE"},"rela":"may_treat","relaSource":"MEDRT"},{"minConcept":{"rxcui":"142439","name":"Hydrocodone Bitartrate","tty":"PIN"},

 

Thanks.

3 REPLIES 3
Amir
PROC Star

Please show what you would like the output data to look like and what data type and length each column should have.

 

Thanks,

Amir.

SuryaKiran
Meteorite | Level 14

Hello,

 

Is this an xml file? Does it have a specific pattern? Try using _infile_ to read this kind of unstructured data. Please provide more information on how your data pattern aligns & how you need the output. 

 

Thanks,

Kiran

 

Thanks,
Suryakiran
andreas_lds
Jade | Level 19

Looks like a json-file, have your tried reading it by using libname jlib json "path-to-file"?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 563 views
  • 0 likes
  • 4 in conversation