の is a very flexible particle, but there is one strict rule: the last noun is the main noun. Others serve as modifiers.
- 日本人の医者 a Japanese doctor / a doctor who is Japanese
- 医者の日本人 a Japanese person who is a doctor
If you want to say "a 30-year-old female Japanese doctor", doctor is the main word, so your translation should not end with 女 or 日本人. Besides this rule, the order of modifies is flexible as long as changing the order does not introduce ambiguity. In your case, the following phrases are all grammatical and at least understandable.
But native speakers don't usually say something like this in reality. Using three or more の's in succession tends to be seen as unsophisticated. You can reduce at least one の by using 女医 ("female doctor") instead of 女の医者:
In this case の after 日本人 can be omitted, too, because ～人 is often used like a prefix:
Lastly, please keep in mind that changing the word order may result in a change in meaning.
- 30歳の女の話 a story of a 30-year-old woman
- 女の30歳の話 (incorrect)
- 太郎の友達の本 a book of Taro's friend
- 友達の太郎の本 a book of my friend Taro