
    Lpi?                         S SK Jr  S SK7  S SK7  S SKJr  S SK7   " S S5      r " S S\R                  5      r	 " S S	5      r
 " S
 S\R                  5      r " S S\R                  5      rg)    )render)*)genericsc                   2    \ rS rSrS rS rS rS rS rSr	g)	MonthLyTipData	   c                    US   [         R                  5       [         R                  5       S.n[        US9nUR                  5       (       a  UR	                  5         SUR
                  ;   a  U R                  XR
                  S   SS5        U R                  XR
                  S   SS5        U R                  XR
                  S   SS5        U R                  XR
                  S   SS5        g g g )	Nmonth)monthNumbercreatedDateupdatedDatedataiden   ar   )datetimenowMonthlyTipSerializeris_validsaver   saveMonthlyTipLanguagesaveTip)selfcurrent
monthlyTipmonthlyTipSers       ~/Users/waleedhassanin/Documents/snowflake_co_dev_github/snow_flake_back_end_deploy/mama_care_api/mama_care_setup_init/views.pysaveMonthLyTipMonthLyTipData.saveMonthLyTip
   s    !'*",,.",,.


 -J?!!## })))++G4F4Ft4LTRST++G4F4Ft4LTRSTW%7%7%=d1EW%7%7%=d1E	 * $    c                    SUSU-      SUSU-      SUSU-      S[         R                  5       S[         R                  5       S	U[        U0n[        US
9nUR	                  5       (       a!  UR                  5         SUR                  ;   a  gg)Ntitletitle_descriptiontext_inspirationinspiration_r   r   monthlyTipIdr   r   TF)r   r   languageKeyMonthlyTipLanguageSerializerr   r   r   )r   r   r+   langlangIdmonthlyTipLanguagemonthlyTipLanguageSers          r    r   %MonthLyTipData.saveMonthlyTipLanguage   s    GHTM*''$,/'."56(,,.(,,.<
 !=DV W ))++!&&(,111r#   c                 L   SU-   U;   a  USU-       H  n[         R                  5       [         R                  5       US.n[        US9nUR                  5       (       d  MM  UR	                  5         SUR
                  ;   d  Mo  U R                  XWR
                  S   U5        M     g g )Ntips_)r   r   r+   r   r   )r   r   TipSerializerr   r   r   saveTipLanguage)r   r   r+   r.   r/   selectedtiptipSers           r    r   MonthLyTipData.saveTip-   s    4<7"#GDL1"*,,."*,,.#/
 'c2??$$KKMv{{*,,Xkk$6GO 2 #r#   c           
          SUS[         R                  5       S[         R                  5       SU[        U0n[        US9nUR	                  5       (       a!  UR                  5         SUR                  ;   a  gg)	Nr'   r   r   tipIdr   r   TF)r   r   r,   TipLanguageSerializerr   r   r   )r   r'   r<   r/   tipLanguagetipLanguageSers         r    r6   MonthLyTipData.saveTipLanguage;   si    +(,,.(,,.E
 /kB""$$!~***r#   c                     [        [        S-   SSS9 n[        R                  U5      nU H  nU R	                  U5        M     S S S 5        g ! , (       d  f       g = f)Nz /add_data_json/monthly_tips.jsonrutf-8encoding)open
MEDIA_ROOTjsonloadr!   )r   filejsonData	monthTipss       r    readDataMonthLyTipData.readDataJ   sI    *??gVZ^yyH%	##I. & WVVs   0A
A N)
__name__
__module____qualname____firstlineno__r!   r   r   r6   rM   __static_attributes__rO   r#   r    r   r   	   s    F &P/r#   r   c                   $    \ rS rSr\/r/ rS rSrg)MonthlyTipDataInitialP   c                 P    [        5       nUR                  5         [        SSS.SS9$ NT 	isSuccesserrorFsafe)r   rM   JsonResponser   requestargskwargsr   s        r    postMonthlyTipDataInitial.postS   s%    $<5IIr#   rO   N	rP   rQ   rR   rS   APIKeyAuthenticationauthentication_classesquerysetre   rT   rO   r#   r    rV   rV   P       23HJr#   rV   c                   h    \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rSrg)PregnancyDataX   c           	         [         S-   US   -   nS n[        R                  R                  U5      (       a  [	        US5      n[        U5      nUS   S[        US   5      -   US   US   U[        R                  5       [        R                  5       S.n[        US9nUR                  5       (       a  UR                  5         S	UR                  ;   Ga,  UR                  S	   S
:  Ga  U R                  US   UR                  S	   SS5      nU R                  US   UR                  S	   SS5      nU R                  US   UR                  S	   5      n	U R                  US   UR                  S	   5      n
U R!                  US   UR                  S	   5      nU R#                  US   UR                  S	   [         S-   S-   [        US   5      -   S-   5      nU(       a$  U(       a  U	(       a  U
(       a  U(       a  U(       a  gg)N/imagerbweekweek_	trimester)r   keyName
weekNumberru   rq   r   r   r   r   r   fetal_developmentr   r   r   r   symptoms	checklist	nutrition	baby_size/add_baby_size/z.pngTF)rG   ospathexistsrF   Filestrr   r   PregnancyWeekDetailSerializerr   r   r   saveWeekLanguagesaveSymptomListsaveCheckListsaveNutritionListsaveBabySize)r   r   	file_path
djangoFilefrs   selectedServal1val2val3val4val5val6s                r    saveWeekPregnancyData.saveWeekZ   s   sN77#33	
77>>)$$Y%AaJ c'&/22 ,",,.",,.
 5DA!!;###%),,W5H-I;K[K[\`Kabfghi,,W5H-I;K[K[\`Kabfghi++GJ,?@P@PQU@VW))'+*>{?O?OPT?UV--gk.B;CSCSTXCYZ(()=k>N>Nt>TU_`qUqryUyz}  F  GM  N  {O  VO  PV  VV  WDTdtr#   c           
      6   SnSnSX   S[         R                  5       S[         R                  5       SU[        U0n[        US9nUR	                  5       (       a8  UR                  5         SUR                  ;   a  UR                  S   S:  a  US	-   nUS:X  a  S
nU$ )NFr   fetalDevelopmentr   r   pregnancyWeekIdr   r   r   T)r   r   r,   PregnancyWeekLanguageSerializerr   r   r   )	r   r   weekIdlangKeyr/   isCheck
countErrorweekLanguager   s	            r    r   PregnancyData.saveWeekLanguage|   s    
 w/(,,.(,,.f
 6\J!!{'''##D)A-!+aJ?Gr#   c                     US   nUS   nUR                  5       UR                  5       :X  a:  [        SUR                  5       S5       H  nU R                  X5   XE   U5        M     g g Nr   r   r   r   )__len__rangesaveSymptomr   r   r   enListarListis         r    r   PregnancyData.saveSymptomList   s_    >>v~~//1V^^-a0  69V< 1 0r#   c                 j   U[         R                  5       [         R                  5       S.n[        US9nUR                  5       (       ak  UR	                  5         SUR
                  ;   aK  U R                  XR
                  S   S5      nU R                  X%R
                  S   S5      nUS:X  a  US:X  a  ggN)r   r   r   r   r   r   r   TF)r   r   PregnancySymptomSerializerr   r   r   saveSymptomLanguage)r   descriptionENdescriptionARr   symptomr   r   r   s           r    r   PregnancyData.saveSymptom   s    $",,.",,.

 1@!!{'''//>N>Nt>TUVW//>N>Nt>TUVW4<DDLr#   c                    SnSnU[         R                  5       [         R                  5       UUS.n[        US9nUR                  5       (       a(  UR	                  5         UR
                  S   S:  a  US-   nUS:X  a  SnU$ )NFr   )r'   r   r   pregnancySymptomId
languageIdr   r   r   T)r   r   "PregnancySymptomLanguageSerializerr   r   r   )r   r'   	symptomIdr/   r   r   symptomLanguager   s           r    r   !PregnancyData.saveSymptomLanguage   s    
)&lln&lln%.# 9P!!%)'!^
?r#   c                     US   nUS   nUR                  5       UR                  5       :X  a:  [        SUR                  5       S5       H  nU R                  X5   XE   U5        M     g g r   )r   r   saveCheckItemr   s         r    r   PregnancyData.saveCheckList   _    >>v~~//1V^^-a0""69VYv> 1 0r#   c                 j   U[         R                  5       [         R                  5       S.n[        US9nUR                  5       (       ak  UR	                  5         SUR
                  ;   aK  U R                  XR
                  S   S5      nU R                  X%R
                  S   S5      nUS:X  a  US:X  a  ggr   )r   r   PregnancyCheckListSerializerr   r   r   saveCheckItemLanguage)r   r   r   r   rz   r   r   r   s           r    r   PregnancyData.saveCheckItem       $",,.",,.
	
 3)D!!{'''11-@P@PQU@VWXY11-@P@PQU@VWXY4<DDLr#   c                    SnSnU[         R                  5       [         R                  5       UUS.n[        US9nUR                  5       (       a(  UR	                  5         UR
                  S   S:  a  US-   nUS:X  a  SnU$ )NFr   )r'   r   r   pregnancyCheckListIdr   r   r   r   T)r   r   $PregnancyCheckListLanguageSerializerr   r   r   )r   r   r   r/   r   r   checkListLanguager   s           r    r   #PregnancyData.saveCheckItemLanguage   s    
%&lln&lln'0#
 ;BST!!%)'!^
?r#   c                     US   nUS   nUR                  5       UR                  5       :X  a:  [        SUR                  5       S5       H  nU R                  X5   XE   U5        M     g g r   )r   r   saveNutritionr   s         r    r   PregnancyData.saveNutritionList   r   r#   c                 j   U[         R                  5       [         R                  5       S.n[        US9nUR                  5       (       ak  UR	                  5         SUR
                  ;   aK  U R                  XR
                  S   S5      nU R                  X%R
                  S   S5      nUS:X  a  US:X  a  ggr   )r   r   PregnancyNutritionSerializerr   r   r   saveNutritionLanguage)r   r   r   r   r{   r   r   r   s           r    r   PregnancyData.saveNutrition   r   r#   c                    SnSnU[         R                  5       [         R                  5       UUS.n[        US9nUR                  5       (       a(  UR	                  5         UR
                  S   S:  a  US-   nUS:X  a  SnU$ )NFr   )r'   r   r   pregnancyNutritionIdr   r   r   r   T)r   r   $PregnancyNutritionLanguageSerializerr   r   r   )r   r   r   r/   r   r   nutritionLanguager   s           r    r   #PregnancyData.saveNutritionLanguage  s    
 &&lln&lln'0# ;BST!!%)'!^
?Gr#   c                 P   UnS n[         R                  R                  U5      (       a  [        US5      n[	        U5      nO#[
        S-   S-   n[        US5      n[	        U5      nS[        U5      -   UU[        R                  5       [        R                  5       S.n[        US9nUR                  5       (       am  UR                  5         SUR                  ;   aM  U R                  XR                  S   SS	5      n	U R                  XR                  S   S
S5      n
U	S:X  a  U
S:X  a  gg)Nrr   r}   z
week_2.pngrt   )rv   r   rq   r   r   r   r   r   r   r   r   TF)r~   r   r   rF   r   rG   r   r   r   !PregnancyBabySizeDetailSerializerr   r   r   saveBabySizeLanguage)r   r   r   	imagePathr   r   r   babySizer   r   r   s              r    r   PregnancyData.saveBabySize  s   	
77>>)$$Y%AaJ"#44\AIY%AaJ c&k)$",,.",,.
 8xH!!{'''009I9I$9OPTUVW009I9I$9OPTUVW4<DDLr#   c           
      6   SnSnSX   S[         R                  5       S[         R                  5       SU[        U0n[        US9nUR	                  5       (       a8  UR                  5         SUR                  ;   a  UR                  S   S:  a  US	-   nUS:X  a  S
nU$ )NFr   r'   r   r   pregnancyBabySizeIdr   r   r   T)r   r   r,   #PregnancyBabySizeLanguageSerializerr   r   r   )	r   r   
babySizeIdr   r/   r   r   r   r   s	            r    r   "PregnancyData.saveBabySizeLanguage7  s    
 '*(,,.(,,.!*
 :N!!{'''##D)A-!+aJ?Gr#   c                     [        [        S-   SSS9 n[        R                  U5      nSU;   a  US    H  nU R	                  U5        M     S S S 5        g ! , (       d  f       g = f)Nz&/add_data_json/pregnancy_weeks_v3.jsonrB   rC   rD   weeks)rF   rG   rH   rI   r   )r   rJ   rK   rs   s       r    rM   PregnancyData.readDataM  sU    *EEsT[\`dyyH("$W-DMM$' . ]\\s   9A
A#rO   N)rP   rQ   rR   rS   r   r   r   r   r   r   r   r   r   r   r   r   r   rM   rT   rO   r#   r    rm   rm   X   sI     D,= ,? ,? .:,(r#   rm   c                   $    \ rS rSr\/r/ rS rSrg)PregnancyDataInitialiT  c                 P    [        5       nUR                  5         [        SSS.SS9$ rY   )rm   rM   r`   ra   s        r    re   PregnancyDataInitial.postW  s$    $<5IIr#   rO   Nrg   rO   r#   r    r   r   T  rk   r#   r   c                       \ rS rSr\/r/ rS rS rS r	S r
S rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rSrg)SetupInitiali]  c                 X    UU[         R                  5       [         R                  5       S.$ )N)rv   tokenTypeLenr   r   r   r   )r   rv   r   s      r    createTokenTypeSetupInitial.createTokenTypea  s&     (#<<>#<<>	
 	
r#   c                     SnU R                  SS5      U R                  SS5      U R                  SS5      /nU H8  n[        US9nUR                  5       (       a  UR                  5         M3  US	-   nM:     US:X  a  g
g)Nr   adminn   parent7   guest   r   r   TF)r   TokenTypeSerializerr   r   )r   r   dataListr   tokenTypeSerializers        r    addTokenTypeListSetupInitial.addTokenTypeListm  s    
   #.  2.  "-
 A"51"="++--#((*'!^
  ?r#   c                 \    UUUU[         R                  5       [         R                  5       S.$ )N)namecountryCode	isEnabledlanguageCoder   r   r   )r   r   r   r   r   s        r    createLanguageSetupInitial.createLanguage  s*    &"(#<<>#<<>
 	
r#   c                     SnU R                  SSSS5      U R                  SSSS5      /nU H8  n[        US	9nUR                  5       (       a  UR                  5         M3  US
-   nM:     US:X  a  gg)Nr   EnglishUSTr   ArabicSAr   r   r   F)r   LanguageSerializerr   r   )r   r   r   r   languageSerializers        r    addLanguageListSetupInitial.addLanguageList  s    
 	4t<$d;

 A!3!;!**,,"'')'!^
  ?r#   c                     UUSS.USS./S.$ Nr   r   r   r   )rv   languageListrO   r   rv   enNamearNames       r    createChildTypeSetupInitial.createChildType  $    q1q1
 	
r#   c                    SnU R                  SSS5      U R                  SSS5      /nU H  n[        US9nUR                  5       (       a  UR                  5         S	UR                  ;   ag  US
    H\  n0 nUS   US'   UR                  S	   US'   US   US'   [        US9nUR                  5       (       a  UR                  5         MW  US-   nM^     M  US-   nM  US-   nM     US:X  a  gg)Nr   pregnantPregnantu   حملchildChildu   طفلr   r   r
  r   childTypeIdr   r   TF)r  ChildTypeSerializerr   r   r   ChildTypeLanguageSerializer)r   r   r   r   childTypeSerializerjtempchildTypeLanguageSerializers           r    addChildTypeListSetupInitial.addChildTypeList  s   
  ZB  '8<

 A"51"="++--#((*.333~.!'(yV.A.F.Ft.L]+-.|_\*6Q!%73 7??AA7<<>)3aJ / ",aJ'!^
- 0 ?r#   c                     UUSS.USS./S.$ r  rO   r  s       r    createGenderSetupInitial.createGender  r  r#   c                    SnU R                  SSS5      U R                  SSS5      U R                  SS	S
5      /nU H  n[        US9nUR                  5       (       a  UR                  5         SUR                  ;   ag  US    H\  n0 nUS   US'   UR                  S   US'   US   US'   [        US9nUR                  5       (       a  UR                  5         MW  US-   nM^     M  US-   nM  US-   nM     US:X  a  gg)Nr   maleMaleu   ذكرfemaleFemaleu   أنثىidkzI Don't Knowu   لا أعرفr   r   r
  r   genderIdr   r   TF)r   GenderSerializerr   r   r   GenderLanguageSerializer)r   r   r   r   genderSerializerr  r  genderLanguageSerializers           r    addGenderListSetupInitial.addGenderList  s   
ffh7h*=e^_E
 A/Q7((** %%'+000~.!'(yV+;+@+@+FZ(-.|_\*3KQU3V03<<>>499;)3aJ / ",aJ'!^
) , ?r#   c                     UnS n[        US5      n[        U5      nUU[        R                  5       [        R                  5       USS.USS./S.nU$ )Nrr   r   r	  r   )rv   rq   r   r   r
  )rF   r   r   r   )	r   rv   r  r  r   r   r   r   r   s	            r    createSymptomTypeSetupInitial.createSymptomType  s^    	
D!!W
 #<<>#<<>q1q1	
 r#   c                 <   SnU R                  SSS[        S-   5      U R                  SSS[        S	-   5      U R                  S
SS[        S-   5      U R                  SSS[        S-   5      U R                  SSS[        S-   5      U R                  SSS[        S-   5      U R                  SSS[        S-   5      U R                  SSS [        S!-   5      U R                  S"S#S$[        S%-   5      U R                  S&S'S([        S)-   5      U R                  S*S+S,[        S--   5      U R                  S.S/S0[        S1-   5      U R                  S2S3S4[        S5-   5      U R                  S6S7S8[        S9-   5      U R                  S:S;S<[        S=-   5      U R                  S>S?S@[        SA-   5      U R                  SBSCSD[        SE-   5      U R                  SFSGSH[        SI-   5      U R                  SJSKSL[        SM-   5      U R                  SNSOSP[        SQ-   5      U R                  SRSSST[        SU-   5      U R                  SVSWSX[        SY-   5      U R                  SZS[S\[        S]-   5      /nU H  n[        US^S_9nUR                  5       (       a  UR	                  5         S`UR
                  ;   ag  USa    H\  n0 nUSb   USb'   UR
                  S`   USc'   USd   USd'   [        USe9nUR                  5       (       a  UR	                  5         MW  USf-   nM^     M  USf-   nM  USf-   nM     US:X  a  g^gg)hNr   	back_painz	Back painu   ألم الظهرz/add_symptom_type/back_pain.pngbloatingBloatingu   انتفاخz/add_symptom_type/bloating.pngcontractionsContractionsu   انقباضاتz"/add_symptom_type/contractions.pngsore_breastszSore breastsu   ألم في الثديz"/add_symptom_type/sore_breasts.pngconstipationConstipationu
   إمساكz"/add_symptom_type/constipation.pngcrampingCrampingu   تشنجاتz/add_symptom_type/cramping.png	diarrhoea	Diarrhoeau
   إسهالz/add_symptom_type/diarrhoea.png	dizziness	Dizzinessu   دوخةz/add_symptom_type/dizziness.png
exhaustion
Exhaustionu
   إرهاقz /add_symptom_type/exhaustion.pngfood_aversionzFood aversionsu   نفور من الطعامz#/add_symptom_type/food_aversion.pngfood_cravingzFood cravingsu   اشتهاء الطعامz"/add_symptom_type/food_craving.pngfrequent_urinationzFrequent urinationu   تبول متكررz(/add_symptom_type/frequent_urination.png	headaches	Headachesu   صداعz/add_symptom_type/headaches.png	heartburn	Heartburnu   حرقة المعدةz/add_symptom_type/heartburn.pngitchingItchingu   حكةz/add_symptom_type/itching.pnginsomniaInsomniau   أرقz/add_symptom_type/insomnia.pngmorning_sicknesszMorning sicknessu   غثيان الصباحz&/add_symptom_type/morning_sickness.pngpelvic_painzPelvic painu   ألم الحوضz!/add_symptom_type/pelvic_pain.pngspottingSpottingu   نزول نقاط دمz/add_symptom_type/spotting.pngstuffy_nosezStuffy noseu   احتقان الأنفz!/add_symptom_type/stuffy_nose.pngswellingSwellingu   تورمz/add_symptom_type/swelling.png	discharge	Dischargeu   إفرازاتz/add_symptom_type/discharge.pngotherOtheru   أخرىz/add_symptom_type/other.pngT)r   partialr   r
  r   symptomTypeIdr   r   r   F)r0  rG   SymptomTypeSerializerr   r   r   SymptomTypeLanguageSerializer)r   r   r   r   symptomTypeSerializerr  r  symptomTypeLanguageSerializers           r    addSymptomListSetupInitial.addSymptomList  s   
""#<<	 ""J
Cc8c """??	 ""(??	 ""??	 ""J
Cc8c ""<<	 ""[*jAb6b ""==	 "" ,@@	 ""+??	 ""$$%EE	 ""[*jAb6b ""'<<	 ""9h
;Z0Z ""J*=]2] """")CC	 ""#>>	 ""(;;	 "")>>	 ""J
J?_4_ "" <<	 ""*j9V.Vas
j A$9q$$O!$--//%**,0555~.!'(yV0E0J0J40P_--.|_\*8U!%95 9AACC9>>@)3aJ / ",aJ'!^
- 0 ?r#   c           
      l    UUU[         R                  5       [         R                  5       XESS.XgSS./S.$ )Nr   )r   r'   r   r   )rv   countcolorr   r   r
  r   )r   rv   rb  rc  r  enDescriptionr  arDescriptions           r    createKickTrackerStatus$SetupInitial.createKickTrackerStatus  s>     #<<>#<<>QOQO

 
	
r#   c                 N   SnU R                  SSSSSSS5      U R                  S	S
SSSSS5      U R                  S	SSSSSS5      U R                  SSSSSSS5      /nU H  n[        US9nUR                  5       (       a  UR                  5         SUR                  ;   ao  US    Hd  n0 nUS   US'   US   US'   UR                  S   US'   US   US'   [        US9nUR                  5       (       a  UR                  5         M_  US-   nMf     M  US-   nM  US-   nM     US:X  a  g g!)"Nr   warning   
0xFFF44336Warningul   Fewer than 6 movements in 2 hours or no movement during baby's active time — call your doctor immediately.u
   تحذيرu   أقل من 6 حركات خلال ساعتين أو عدم وجود حركة في وقت نشاط الجنين — يجب الاتصال بالطبيب فورًا.caution   
0xFFFFEB3BCautionzP6 to 9 movements within 2 hours or weaker movements than usual. Monitor closely.u
   تنبيهu   من 6 إلى 9 حركات خلال ساعتين أو حركات أضعف من المعتاد. يجب المراقبة عن قرب.r   normal
   
0xFF4CAF50NormalzJ10 or more movements within 2 hours; consistent with baby's usual pattern.u
   طبيعيup   10 حركات أو أكثر خلال ساعتين؛ متسقة مع نمط حركة الجنين المعتاد.r   r   r
  r   r'   kickTrackerStatusIdr   r   TF)rf  KickTrackerStatusSerializerr   r   r   #KickTrackerStatusLanguageSerializer)r   r   r   r   kickTrackerStatusSerializerr  r  #kickTrackerStatusLanguageSerializers           r    addKickTrackerStatusList%SetupInitial.addKickTrackerStatusList  s   
((~ v ((b V ((b V ((\ C9%
N A*E1*M'*3355+0026;;;~.!'(yV./.>]+6Q6V6V 723 ./|_\* @TJ < ?GGII?DDF)3aJ /" ",aJ'!^
3 6 ?r#   c                 	   S[         R                  5       [         R                  5       SSS.SSS./SSS	[         R                  5       [         R                  5       S
SS.SSS./SS[         R                  5       [         R                  5       S.S.SS	S[         R                  5       [         R                  5       SSS.SSS./SS[         R                  5       [         R                  5       S.S.SSS[         R                  5       [         R                  5       SSS.SSS./SS[         R                  5       [         R                  5       S.S.SSS[         R                  5       [         R                  5       SSS.SSS./S S![         R                  5       [         R                  5       S.S./S".S#[         R                  5       [         R                  5       S$SS.S%SS./SSS	[         R                  5       [         R                  5       S
SS.SSS./S&S'[         R                  5       [         R                  5       S.S.SS	S[         R                  5       [         R                  5       SSS.SSS./S&S([         R                  5       [         R                  5       S.S.SSS[         R                  5       [         R                  5       SSS.SSS./S)S*[         R                  5       [         R                  5       S.S.SSS[         R                  5       [         R                  5       SSS.SSS./S+S,[         R                  5       [         R                  5       S.S./S"./nU GH  n[        US-9nUR                  5       (       d  M$  UR	                  5         S.UR
                  ;   d  MF  US/    HE  nUR
                  S.   US0'   [        US-9nUR                  5       (       d  M5  UR	                  5         MG     US1    H  nUR
                  S.   US0'   [        US-9nUR                  5       (       d  M5  UR	                  5         S.UR
                  ;   d  MW  US/    HE  nUR
                  S.   US2'   [        US-9n	U	R                  5       (       d  M5  U	R	                  5         MG     US3   n
UR
                  S.   U
S2'   [        U
S-9nUR                  5       (       d  M  UR	                  5         M     GM     g4)5N
singletone
Singletoner   r	  u   حمل مفردr   underweightr   g     2@Underweightu   نقص الوزنg      )@   )minmaxr   r   )rv   r  r  r   r   r
  
weightGainrq  gfffff8@rt  u   وزن طبيعيg      '@   
overweight   gfffff=@
Overweightu   زيادة في الوزن   obese   Obeseu   سمنةrj  r   )rv   r   r   r
  caseListtwinTwinu   حمل بتوأمg0@g     8@   g333333,@g333336@g&@g3@r   r   r
  bmiCaseTypeIdr  	bmiCaseIdr  T)
r   r   BMICaseTypeSerializerr   r   r   BMICaseTypeLanguageSerializerBMICaseSerializerBMICaseLanguageSerializerBMICaseWeightGainSerializer)r   
bmiMapList
bmiMapCasebmiCaseTypeSerializerbmiCaseTypeLanguagebmiCaseTypeLanguageSerializerbmiCasebmiCaseSerializerbmiCaseLanguagebmiCaseLanguageSerializerr  bmiCaseWeightGainSerializers               r    addBMICaseListSetupInitial.addBMICaseList  s    ('||~'||~);.a@! $1 #'/||~'/||~%2!D%8J)
 $(#%+3<<>+3<<>	&$ $,##'/||~'/||~%-Q?%8J)
 $(#%+3<<>+3<<>	&$ $0!#'/||~'/||~%1C%AQRS)
 $%#'+3<<>+3<<>	&$ $+! '/||~'/||~%,A>%/qA)
 $%#$+3<<>+3<<>	&iEN` "'||~'||~#150B! $1 #'/||~'/||~%2!D%8J)
 $(#'+3<<>+3<<>	&$ $,##'/||~'/||~%-Q?%8J)
 $(#%+3<<>+3<<>	&$ $0!#'/||~'/||~%1C%AQRS)
 $(#'+3<<>+3<<>	&$ $+! '/||~'/||~%,A>%/qA)
 $(#'+3<<>+3<<>	&iENa_

B %J$9$L!$--//%**,0555/9./I+?T?Y?YZ^?_+O<8U]p8q58AACC9>>@	 0J $.j#93H3M3Md3S0,=W,M),5577-224#'8'='==7>~7NOCTCYCYZ^C_OK$@@Yap@q$='@'I'I'K'K(A(F(F(H	 8O .5\-B
:K:P:PQU:V
; 7>Y_i>j ;#>#G#G#I#I$?$D$D$F! $: %< r#   c                     UUSS.USS./S.$ r  rO   r  s       r    createCalculationMethod$SetupInitial.createCalculationMethod  r  r#   c                 z   SnU R                  SSS5      U R                  SSS5      U R                  SS	S
5      U R                  SSS5      /nU H  n[        R                  5       US'   [        R                  5       US'   [        US9nUR	                  5       (       a  UR                  5         SUR                  ;   ag  US    H\  n0 nUS   US'   UR                  S   US'   US   US'   [        US9nUR	                  5       (       a  UR                  5         MW  US-   nM^     M  US-   nM  US-   nM     US:X  a  gg)Nr   last_periodzLast Periodu   آخر دورة شهريةconception_datezConception Dateu   تاريخ الإخصابivfIVFu   أطفال الأنابيب
ultrasound
Ultrasoundu,   الأشعة الصوتية (السونار)r   r   r   r   r
  r   calculationMethodIdr   r   TF)r  r   r   CalculationMethodSerializerr   r   r   #CalculationMethodLanguageSerializer)r   r   r   r   calculateMethodSerializerr  r  #calculationMethodLanguageSerializers           r    addCalculationMethodList%SetupInitial.addCalculationMethodList  sV   
((Gcd(():<MOjk((7TU((|Est	
 A'||~Am'||~Am(C(K%(1133)..04999~.!'(yV6O6T6TUY6Z23-.|_\*>agk>l;>GGII?DDF)3aJ / ",aJ'!^
- 0 ?r#   c                     SS0SS0/nSnU Hf  n[         R                  5       US'   [         R                  5       US'   [        US9nUR                  5       (       a  UR	                  5         Ma  US-   nMh     US:X  a  g	g
)Nrv   IOSAndroidr   r   r   r   r   TF)r   r   DeviceOSTypeSerializerr   r   )r   r   r   r   deviceOSTypeSerializers        r    addDeviceOSTypeList SetupInitial.addDeviceOSTypeList  s     % )	
 
A'||~Am'||~Am%;%C"%..00&++-'!^
  ?r#   c           
      `   [         R                  R                  SS9n[        SU[        R                  5       [        R                  5       S9nUR                  5         UR                  bD  [        SSSS[        R                  5       [        R                  5       US9nUR                  5         g	g
)Nr   )r   z+201019340601)phoner   r   r   Test1ztest_1@gmail.com123456)	firstNamelastNameemailpasswordr   r   parentIdTF)	LanguageobjectsgetParentr   r   r   r   ParentDetail)r   r7   r   parentDetails       r    	addParentSetupInitial.addParent   s    ##''1'-!  	
 	99 '! (!$LLN$LLN!L r#   c                    U R                  5       nU(       a  U R                  5       nO[        SSS.SSS9$ U(       a  U R                  5       nO[        SSS.SSS9$ U(       a  U R	                  5       nO[        SSS.SSS9$ U(       a  U R                  5       nO[        SSS.SSS9$ U(       a  U R                  5       nO[        SS	S.SSS9$ U(       a  U R                  5       nO[        SS
S.SSS9$ U(       a  U R                  5       nO[        SSS.SSS9$ U(       a  U R                  5       nO[        SSS.SSS9$ U(       a  U R                  5       nO[        SSS.SSS9$ US:X  a  [        SSS.SSS9$ [        SSS.SS9$ )NFzToken Types list is not addedr[   i  )r_   statuszLanguage list is not addedzChild Type list is not addedzGender list is not addedzSymptom Types list is not addedzTrack Status list is not addedzBMI Case list is not addedz$Calculation method list is not addedz Device OS Type List is not AddedzCan not add ParentTrZ   r^   )r   r  r`   r  r-  r_  rz  r  r  r  r  )r   rb   rc   rd   isAddeds        r    re   SetupInitial.post  s   '')**,G#.MN  ++-G#.JK  ((*G#.LM  ))+G#.HI  335G#.OP  ))+G#.NO  335G#.JK  ..0G#.TU  nn&G#.PQ  e#.BC  $<5IIr#   rO   N)rP   rQ   rR   rS   rh   ri   rj   r   r   r   r  r  r  r   r-  r0  r_  rf  rz  r  r  r  r  r  re   rT   rO   r#   r    r   r   ]  su    23H

*
(
"H
!F$Rh
GR@D
$L00\Jr#   r   N)django.shortcutsr   mama_care.modelsmama_care.serializersrest_frameworkr   mama_care.viewsr   GenericAPIViewrV   rm   r   r   rO   r#   r    <module>r     sl    #  # # E/ E/NJH33 Jz( z(xJ822 JWJ8** WJr#   