| Topic | Presenter | Summary | Duration |
| ------------------------------------------ | --------------- | ------------------------------------------------------------------------- | -------- |
| Adding a Custom Tab: Medical Questionnaire | JC and David F. | This is from a paired programming session and covers adding a custom tab. | 13:20 |00:00:07.030 --> 00:00:11.450 Alright, so. First will get this00:00:11.450 --> 00:00:13.482 ticket alright. So basically00:00:13.482 --> 00:00:17.269 what this ticket wanted me to do.00:00:17.270 --> 00:00:21.477 Is add a new tab underneath this00:00:21.477 --> 00:00:25.070 confirmation tab that is basically a.00:00:25.070 --> 00:00:25.914 Medical questionnaire,00:00:25.914 --> 00:00:29.290 let's see if I have a actual picture00:00:29.367 --> 00:00:31.726 of what they wanted to look like.00:00:31.730 --> 00:00:33.314 Alright, so basically let00:00:33.314 --> 00:00:36.040 me see if I can zoom in.00:00:36.040 --> 00:00:37.255 So basically this is the00:00:37.255 --> 00:00:38.470 way that they want it.00:00:38.470 --> 00:00:40.472 They have the address book and then00:00:40.472 --> 00:00:43.156 they want an extra like custom tab in00:00:43.156 --> 00:00:44.916 here to say medical questionnaire.00:00:44.920 --> 00:00:47.728 So the first thing that I00:00:47.728 --> 00:00:50.167 personally thought of was is00:00:50.167 --> 00:00:52.999 that I'll check the app settings.00:00:53.000 --> 00:00:55.149 Uh, and just check to see if00:00:55.149 --> 00:00:57.120 there is something for the custom.00:00:57.120 --> 00:01:00.264 Uh, that you could just add in there.00:01:00.270 --> 00:01:02.111 So the first word that I just00:01:02.111 --> 00:01:04.132 search for was custom just to see00:01:04.132 --> 00:01:06.400 if that would get me anywhere, uh?00:01:06.400 --> 00:01:10.480 I would search for that and this J00:01:10.480 --> 00:01:14.050 config file. So we look for customs.00:01:14.050 --> 00:01:15.710 Yeah, these from past experience,00:01:15.710 --> 00:01:16.706 these first ones.00:01:16.706 --> 00:01:19.030 You can skip those and you basically00:01:19.093 --> 00:01:20.995 want to go to these properties.00:01:21.000 --> 00:01:23.331 So I just came through here and00:01:23.331 --> 00:01:25.682 started searching to see if I could00:01:25.682 --> 00:01:27.282 find one that's actually like,00:01:27.290 --> 00:01:28.048 you know,00:01:28.048 --> 00:01:30.701 looks like the one that I want00:01:30.701 --> 00:01:32.980 and then that took me to.00:01:32.980 --> 00:01:34.580 This properties three dot CS00:01:34.580 --> 00:01:36.668 and here we see this clarity00:01:36.668 --> 00:01:38.340 registration panels custom enabled00:01:38.340 --> 00:01:41.349 so that right off the bat I'm like.00:01:41.350 --> 00:01:43.170 OK that's what I need,00:01:43.170 --> 00:01:45.445 so I went ahead and copied that00:01:45.445 --> 00:01:47.180 into my app settings.00:01:47.180 --> 00:01:51.750 As you can see here and set that to true.00:01:51.750 --> 00:01:56.420 And then also if you go down in that file.00:01:56.420 --> 00:01:58.756 You'll see that they have one called title,00:01:58.760 --> 00:01:59.840 so is that OK?00:01:59.840 --> 00:02:01.830 Then I definitely do set this as00:02:01.830 --> 00:02:03.672 well so that it actually looks00:02:03.672 --> 00:02:05.759 like the picture that I showed you,00:02:05.760 --> 00:02:08.080 so I went ahead and set that to00:02:08.080 --> 00:02:09.680 the medical questionnaire.00:02:09.680 --> 00:02:13.520 Then I went ahead and restarted my apples.00:02:13.520 --> 00:02:16.562 Uhm to see if I could like get it00:02:16.562 --> 00:02:19.074 working and the one thing that I00:02:19.074 --> 00:02:22.034 noticed is that I couldn't like the00:02:22.034 --> 00:02:25.010 actual tab itself was not rendering.00:02:25.010 --> 00:02:27.666 And it still just look like the basic00:02:27.666 --> 00:02:29.827 setup without that actual tab in it.00:02:29.830 --> 00:02:33.190 So we had to do some like troubleshooting.00:02:33.190 --> 00:02:37.321 And one thing that we found out is that00:02:37.321 --> 00:02:41.060 there was a setting that was missing.00:02:41.060 --> 00:02:44.660 And if we go to.00:02:44.660 --> 00:02:48.396 So the way that we can go about00:02:48.396 --> 00:02:52.105 searching this. Is we went?00:02:52.105 --> 00:02:53.030 2.00:02:53.030 --> 00:02:54.698 Here let's see.00:02:54.698 --> 00:02:58.590 So what I came to understand is00:02:58.709 --> 00:03:00.719 that these steps.00:03:00.720 --> 00:03:02.124 Correlate to that, uh,00:03:02.124 --> 00:03:04.230 to the actual sign in menu,00:03:04.230 --> 00:03:06.300 and, so here's like your basic00:03:06.300 --> 00:03:08.090 info in your address book.00:03:08.090 --> 00:03:09.466 Everything you can set,00:03:09.466 --> 00:03:11.953 and this is where you can see00:03:11.953 --> 00:03:14.059 where the custom tab should be,00:03:14.060 --> 00:03:15.755 and so this reference is00:03:15.755 --> 00:03:17.920 everything that you put in there.00:03:17.920 --> 00:03:20.728 Well, so we realized that it wasn't showing,00:03:20.730 --> 00:03:22.704 so we went through some steps00:03:22.704 --> 00:03:24.020 setting different options and00:03:24.078 --> 00:03:25.638 still couldn't get anywhere.00:03:25.640 --> 00:03:27.608 And one thing that we notice00:03:27.608 --> 00:03:28.920 is when we came00:03:29.004 --> 00:03:31.420 to this service, TS was.00:03:31.420 --> 00:03:36.300 That this return used to just say false.00:03:36.300 --> 00:03:37.480 Like without this information00:03:37.480 --> 00:03:38.955 it just pointed to false,00:03:38.960 --> 00:03:40.808 and because of that it wasn't00:03:40.808 --> 00:03:42.654 actually showing up on the tabs00:03:42.654 --> 00:03:44.838 'cause each time it would reach it it00:03:44.900 --> 00:03:46.916 would say hey she would show this.00:03:46.920 --> 00:03:48.606 And of course this would return00:03:48.606 --> 00:03:50.170 false so it wouldn't return.00:03:50.170 --> 00:03:53.146 So we found one that was similar to00:03:53.146 --> 00:03:55.786 this which I can't remember off the00:03:55.786 --> 00:03:58.578 top of my head which one it was.00:03:58.580 --> 00:04:01.004 I think all of the other ones are00:04:01.004 --> 00:04:02.344 actually similar like address00:04:02.344 --> 00:04:03.680 book and basic info.00:04:03.680 --> 00:04:06.240 Both do the same thing under their Canon.00:04:06.240 --> 00:04:08.198 Able yeah, so yeah did. Yeah.00:04:08.198 --> 00:04:10.774 So we looked at the service of00:04:10.774 --> 00:04:11.980 the address book.00:04:11.980 --> 00:04:14.050 Install and set up a false.00:04:14.050 --> 00:04:15.780 They were returning both these,00:04:15.780 --> 00:04:17.320 so we went ahead,00:04:17.320 --> 00:04:20.519 copied that over and pasted it into here.00:04:20.520 --> 00:04:22.776 And then once we went ahead,00:04:22.780 --> 00:04:24.480 restart apples again and when00:04:24.480 --> 00:04:26.684 we restarted that we then got00:04:26.684 --> 00:04:28.416 our medical questionnaire step.00:04:28.420 --> 00:04:31.024 Now some of this has been changed00:04:31.024 --> 00:04:33.642 a little bit 'cause I'm still00:04:33.642 --> 00:04:35.534 currently working on it.00:04:35.540 --> 00:04:37.416 But with the settings actually in place,00:04:37.420 --> 00:04:39.016 it would show this medical questionnaire.00:04:39.020 --> 00:04:41.449 So let's see if I can actually00:04:41.449 --> 00:04:44.610 show that for you. Uhm?00:04:44.610 --> 00:04:47.650 Go ahead and turn.00:04:47.650 --> 00:04:49.558 This there we go.00:04:51.880 --> 00:04:53.800 I'm kill that.00:04:57.380 --> 00:04:58.170 See.00:05:04.750 --> 00:05:06.742 Right now when this loads up00:05:06.742 --> 00:05:08.584 it should show everything with00:05:08.584 --> 00:05:10.356 that Medical questionnaire tab.00:05:14.170 --> 00:05:16.146 And just for the recording, we,00:05:16.146 --> 00:05:17.922 uh, we actually to figure out00:05:17.922 --> 00:05:19.880 that that was returning false,00:05:19.880 --> 00:05:22.904 so you can see on the screen right now,00:05:22.910 --> 00:05:25.590 and stuff still remained JS and sources tab.00:05:25.590 --> 00:05:27.900 We found this step setup 012 which00:05:27.900 --> 00:05:30.298 correlate Stew some code right above that.00:05:30.300 --> 00:05:33.156 That array of step setups and we found00:05:33.156 --> 00:05:35.557 that three points to custom you can00:05:35.557 --> 00:05:38.181 see at the very top 18979 points to00:05:38.181 --> 00:05:41.052 that and so that was how we debug it.00:05:41.052 --> 00:05:43.068 As we set a break point,00:05:43.070 --> 00:05:44.820 I think on like 1899.00:05:44.820 --> 00:05:47.628 Three yeah, and we saw that roar was,00:05:47.630 --> 00:05:50.081 you know it was like true, true,00:05:50.081 --> 00:05:52.191 undefined false, true, true like, well,00:05:52.191 --> 00:05:54.297 that's probably supposed to be true,00:05:54.300 --> 00:05:56.757 and so that's what led to what00:05:56.757 --> 00:05:58.452 he just described. So yeah.00:05:58.452 --> 00:06:00.057 So basically that's how we00:06:00.057 --> 00:06:01.850 went about actually getting the00:06:01.850 --> 00:06:03.770 medical questionnaires to show up,00:06:03.770 --> 00:06:05.438 and I'll go ahead.00:06:05.438 --> 00:06:07.940 'cause I created a stack overflow00:06:08.026 --> 00:06:09.070 thing for it.00:06:09.070 --> 00:06:10.610 Uh, I'll go ahead and post that00:06:10.610 --> 00:06:12.142 in the chat in case anybody00:06:12.142 --> 00:06:13.780 wants to reference that as well.00:06:16.570 --> 00:06:17.950 Oh, and stop.00:06:22.020 --> 00:06:24.366 If there's anything that I miss, David.00:06:24.366 --> 00:06:27.570 Yeah, I would just the only other thing I00:06:27.650 --> 00:06:30.770 would point out is that in those settings,00:06:30.770 --> 00:06:34.330 UM. NVS code, there's not only those two00:06:34.330 --> 00:06:37.486 where you've got like enabled in title.00:06:37.490 --> 00:06:40.402 There's also order, and if you just00:06:40.402 --> 00:06:43.518 want to show you all direct it up00:06:43.518 --> 00:06:46.429 and show all five or six of them.00:06:46.430 --> 00:06:49.160 Yeah, yeah, so you have enabled position,00:06:49.160 --> 00:06:53.224 title, continue text. And yeah, but yeah,00:06:53.224 --> 00:06:57.250 I think that's the last one, yeah?00:06:57.250 --> 00:06:59.906 So just to point out that you can00:06:59.906 --> 00:07:02.486 set all of that stuff, I don't.00:07:02.486 --> 00:07:05.138 I think. UM, according to that check,00:07:05.138 --> 00:07:08.888 now all you have to set is enabled and.00:07:08.890 --> 00:07:11.608 Uhm? I think enabled control enable.00:07:11.610 --> 00:07:13.570 Yeah, the enabled is the only one00:07:13.570 --> 00:07:15.651 that I actually make it show up and00:07:15.651 --> 00:07:17.958 then I just set title because I just00:07:17.958 --> 00:07:19.748 needed to be medical questionnaire.00:07:21.850 --> 00:07:24.046 So uhm, yeah. So there you go that was.00:07:24.050 --> 00:07:25.999 That was cool, I I. I really wish00:07:25.999 --> 00:07:27.457 we could show more that debugging.00:07:27.460 --> 00:07:29.900 I don't remember how did we even look it up.00:07:29.900 --> 00:07:30.845 We looked for.00:07:30.845 --> 00:07:33.470 The controller let's go over that real quick.00:07:33.470 --> 00:07:36.020 If you don't mind, uh.00:07:36.020 --> 00:07:37.735 'cause I know debugging is one of00:07:37.735 --> 00:07:39.914 the you know. Won't let me, uh,00:07:39.914 --> 00:07:43.009 give me control just so I can point.00:07:43.010 --> 00:07:45.426 So good under your open the tab again,00:07:45.430 --> 00:07:47.833 I think it's gonna get done and So what00:07:47.833 --> 00:07:50.584 we did was we inspected this whole thing.00:07:50.590 --> 00:07:54.440 So go ahead and inspect it again.00:07:54.440 --> 00:07:56.120 We found out, of course,00:07:56.120 --> 00:07:58.190 that all this code is inside00:07:58.190 --> 00:08:00.256 of separatist eration and so we00:08:00.256 --> 00:08:01.806 went to the scope inspector.00:08:04.260 --> 00:08:06.510 And I want to registration controller.00:08:06.510 --> 00:08:09.774 And then we looked in that file for00:08:09.774 --> 00:08:13.682 a for steps right? So what we did?00:08:13.682 --> 00:08:18.638 Yeah, yeah, we look for it in registration.00:08:18.640 --> 00:08:20.474 And so while we looked at self00:08:20.474 --> 00:08:21.524 config multiple, yes, right?00:08:21.524 --> 00:08:22.834 That's what I was thinking00:08:22.834 --> 00:08:23.620 about something else.00:08:23.620 --> 00:08:26.180 We were doing alright.00:08:26.180 --> 00:08:27.026 Then registration.00:08:27.026 --> 00:08:29.987 There you go and then this shows00:08:29.987 --> 00:08:32.376 us where our custom one is.00:08:32.380 --> 00:08:34.564 OK, so here we knew it was coming00:08:34.564 --> 00:08:36.238 through we saw show is true.00:08:36.240 --> 00:08:37.068 We saw it.00:08:37.068 --> 00:08:37.896 They were like.00:08:37.900 --> 00:08:39.622 Well the app settings are right up00:08:39.622 --> 00:08:41.637 and then we went to go open VS code00:08:41.637 --> 00:08:43.319 and we went to the registration00:08:43.319 --> 00:08:45.344 controller like registration DOT TS.00:08:45.350 --> 00:08:47.558 Looks like you don't have it open anymore.00:08:50.370 --> 00:08:52.498 You wanna if you think every click there,00:08:52.500 --> 00:08:54.090 it's probably right next to it,00:08:54.090 --> 00:08:55.154 unless that's the override.00:08:55.154 --> 00:08:57.040 Yeah, there you go.00:08:57.040 --> 00:08:59.200 So click right here.00:08:59.200 --> 00:09:01.336 And so we searched in here00:09:01.336 --> 00:09:02.760 for anything with steps.00:09:02.760 --> 00:09:05.378 Right, because we saw the Ng repeat00:09:05.378 --> 00:09:08.594 step in steps on the front end and we00:09:08.594 --> 00:09:11.484 only found one thing which was this00:09:11.484 --> 00:09:13.914 submit function interact well, that's.00:09:13.914 --> 00:09:15.770 That's not super like.00:09:15.770 --> 00:09:17.940 That's not exactly what we're looking for,00:09:17.940 --> 00:09:20.110 right? So then, I was like, well,00:09:20.110 --> 00:09:22.280 let's go look for what I say.00:09:22.280 --> 00:09:23.210 Step, stop, push.00:09:23.210 --> 00:09:24.760 Yeah, that's what it was.00:09:24.760 --> 00:09:25.690 'cause we're like,00:09:25.690 --> 00:09:27.550 something's gotta populate that array, right?00:09:27.550 --> 00:09:30.030 So we exactly what he's doing right now.00:09:30.030 --> 00:09:32.200 We just look for steps that push.00:09:35.330 --> 00:09:38.984 And we only found you know one file and00:09:38.984 --> 00:09:42.968 so we went to the registration service.00:09:42.970 --> 00:09:45.250 And then here we were like oh wait,00:09:45.250 --> 00:09:47.298 hold on a second and we found throw00:09:47.298 --> 00:09:49.809 up a little and we found this like.00:09:49.810 --> 00:09:51.240 Here's all this stuff, right?00:09:51.240 --> 00:09:52.968 Like here's what eventually becomes steps00:09:52.968 --> 00:09:55.778 and so then we try to put a breakpoint here00:09:55.778 --> 00:09:57.770 realized we couldn't do that because it00:09:57.770 --> 00:09:59.786 doesn't show the result of the function,00:09:59.790 --> 00:10:01.210 it just shows the function.00:10:01.210 --> 00:10:03.205 So then we put a breakpoint here.00:10:03.210 --> 00:10:07.034 Of course in the browser dot NVS code.00:10:07.040 --> 00:10:08.376 Now we showed before,00:10:08.376 --> 00:10:10.849 yeah, under sources tabs.00:10:10.850 --> 00:10:13.496 Yeah, we put a breakpoint like right00:10:13.496 --> 00:10:16.489 there and then we hovered over ugly oh.00:10:16.490 --> 00:10:17.357 That's not true.00:10:17.357 --> 00:10:20.530 So then we had to go track down Canon able,00:10:20.530 --> 00:10:22.392 which we had to track down from00:10:22.392 --> 00:10:24.270 clicking on the registration step.00:10:24.270 --> 00:10:27.878 Custom call right here to see it returned.00:10:27.880 --> 00:10:29.658 And then that's how we found what00:10:29.658 --> 00:10:31.120 we showed earlier in the video,00:10:31.120 --> 00:10:32.856 which was the what is actually returning.00:10:32.860 --> 00:10:34.624 And it was just returning a promise00:10:34.624 --> 00:10:35.850 to always resolves to false.00:10:35.850 --> 00:10:38.419 It says it's supposed to be overwritten.00:10:38.420 --> 00:10:38.920 Uhm?00:10:42.230 --> 00:10:46.574 And. So I'm not sure where it's supposed00:10:46.574 --> 00:10:49.174 to be overridden, so we you know,00:10:49.174 --> 00:10:51.780 we've got a working solution right now.00:10:51.780 --> 00:10:54.642 I don't know if anyone more00:10:54.642 --> 00:10:57.170 experienced wants to chime in on.00:10:57.170 --> 00:11:00.005 If we were supposed to change that00:11:00.005 --> 00:11:02.840 code or not, yeah, you did it.00:11:02.840 --> 00:11:04.865 Yeah you did it right.00:11:04.870 --> 00:11:06.193 You could you.00:11:06.193 --> 00:11:08.839 Actually, you probably did it more00:11:08.839 --> 00:11:11.585 correct than like if you reference RX1
00:11:11.585 --> 00:11:14.695 the like they put in like patient info00:11:14.695 --> 00:11:17.425 instead of basic info and the medical00:11:17.425 --> 00:11:20.260 questionnaire is in there I think too.00:11:20.260 --> 00:11:23.543 So you guys doing it with that00:11:23.543 --> 00:11:25.720 custom is probably better.00:11:25.720 --> 00:11:29.134 Oh cool. Cool, you did it.00:11:29.134 --> 00:11:30.539 You didn't bring over the00:11:30.539 --> 00:11:31.890 actual questionnaire yet.00:11:31.890 --> 00:11:34.188 Did you know OK 'cause Danny00:11:34.188 --> 00:11:36.420 has a test that he can?00:11:36.420 --> 00:11:38.856 He can take care of that part.00:11:38.860 --> 00:11:42.604 He'll just need a probably need your branch.00:11:42.610 --> 00:11:43.154 Gotcha, alright,00:11:43.154 --> 00:11:45.608 So what I already have up just a tab00:11:45.608 --> 00:11:47.606 is that all he needs and then he can00:11:47.662 --> 00:11:49.546 put the medical question in there.00:11:49.550 --> 00:11:51.120 How are you saying, yeah,00:11:51.120 --> 00:11:53.507 like he could take care of the00:11:53.507 --> 00:11:55.792 body like that body dot HTML00:11:55.792 --> 00:11:58.162 summary dot HTML all right sweet.00:11:58.170 --> 00:12:01.026 Cool. So yeah, there you go.00:12:01.030 --> 00:12:02.710 Danny Hope you're watching your.00:12:02.710 --> 00:12:04.058 These are the two.00:12:04.058 --> 00:12:06.080 It's pretty straightforward what's going on,00:12:06.080 --> 00:12:07.752 but you dot HTML.00:12:07.752 --> 00:12:09.006 Brings in title,00:12:09.010 --> 00:12:10.998 summary and body and that you can00:12:10.998 --> 00:12:12.965 you know see wreck step custom00:12:12.965 --> 00:12:15.071 summary or excerpt custom body or00:12:15.071 --> 00:12:17.033 these two files and you'll just00:12:17.033 --> 00:12:18.885 put whatever you need in there.00:12:18.885 --> 00:12:21.020 I don't know what the what is00:12:21.020 --> 00:12:22.718 supposed to look like Danny,00:12:22.720 --> 00:12:25.410 but if you look at what I made for RX1
00:12:25.489 --> 00:12:28.465 it might give you a decent starting point.00:12:28.470 --> 00:12:29.106 Oh yeah,00:12:29.106 --> 00:12:32.780 he's just copying and pasting it, yeah?00:12:32.780 --> 00:12:35.010 OK, cool.00:12:35.010 --> 00:12:36.660 So good stuff, yeah, so I.00:12:36.660 --> 00:12:38.860 I was surprised JC when he called me.00:12:38.860 --> 00:12:39.432 You know,00:12:39.432 --> 00:12:41.434 it's like I've been here five months00:12:41.434 --> 00:12:43.664 and I've never had to do this like how00:12:43.664 --> 00:12:45.737 in the world it's very front Indy.00:12:45.740 --> 00:12:47.021 So anyway cool.00:12:47.021 --> 00:12:49.583 Well anybody got any questions for00:12:49.583 --> 00:12:52.429 JC or for me or for what we did?00:12:52.430 --> 00:12:54.454 Or any corrections if if you think we00:12:54.454 --> 00:12:56.569 should have done something differently or.00:13:03.330 --> 00:13:07.500 OK cool, we rock so uhm.