NOVID-19

Just before lunch yesterday, Oliver’s support worker reported to me that he hadn’t been feeling well: headache, sore throat, stuffy nose, aches. In other words, enough boxes ticked on the COVID-19 symptoms list that I was concerned.

As it happened, The Dr. Heather Morrison Show aired its weekly episode yesterday morning, so I was well-primed with instructions for action.

My first call was to 811, where I was shunted into the “our nurses are occupied right now — someone will call you back within 3 hours” queue.

My second call was to our family doctor, but his office was closed.

A careful reading of the COVID-19 testing page suggested that it was actually okay to simply drop in for a test, so, after a quick bite of lunch, fortified for the prospect of spending the afternoon in one of the long testing lines that have been much-evident in the media from elsewhere of late, we got in the car and drove to the old Government Garage on Park Street.

As it turned out, there was no line at all. We were in and out in 10 efficient minutes. The test didn’t hurt (Oliver reported). The staff were friendly. It was less of a hassle than picking up a burger at the Wendy’s next door.

We were given a sheet with a URL for picking up the results, available, we were told, within 24 to 48 hours; Oliver was told to self-isolate, but I was free, I was told, to move about, albeit with more-than-usual masking (and I’m wearing a mask whenever I’m indoors anyway, so no change for me).

Unsatisfied with the need to hit reload for 24 to 48 hours, and feeling icky about the Google, Facebook, and other advertising trackers on the results pickup page, I threw together a little Node-RED flow to scrape the page for Oliver’s test results every 30 minutes and email me the response.

Screen shot of my Node-RED COVID results checking flow.

This flow takes advantage of the fact that the government’s system consists of a simply HTTP POST of the health card number and expiration date, along with the date of birth and test date, as JSON, and returns JSON with either “No Results Found” or “COVID-19 (Coronavirus) Test Result.”

All of which was easily observable from Firefox’s Developer Tools, which allows the request to be copied as a cURL command:

curl 'https://wdf.princeedwardisland.ca/workflow' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0' -H 'Accept: application/json' -H 'Accept-Language: en' --compressed -H 'Content-Type: application/json' -H 'Origin: https://www.princeedwardisland.ca' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: https://www.princeedwardisland.ca/en/feature/search-my-covid-19-test-results' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '{"featureName":"CovidNegativeResults","metaVars":{"service_id":null,"save_location":null},"queryVars":{"phn":"XXXXXXXX","card_expiry_month":"XXX","card_expiry_year":"XXXX","birth_date":"XXXX-XX-XX","test_date":"XXXX-XX-XX","wdf_prevent_query_string":"true","sid":null,"page_num":"1","page_count":"1","finished":"0"}}'

(I’ve replaced Oliver’s actual data with Xs).

It returns JSON that looks, in part, like this:

[
  {
     "id":"10f659b6-8d21-465d-a243-e72e1acd603f",
     "classes":null,
     "type":"Heading",
     "data":{
        "text":"No Results Found",
        "size":2
     },
     "children":[
        
     ]
  },
  {
     "id":"50ce2982-167b-41e6-a979-decaaea1bb97",
     "classes":null,
     "type":"Paragraph",
     "data":{
        "text":"Check that the information you entered is correct and retry. If your results do not appear 72 hours after testing, please contact mytestresults@gov.pe.ca or 1-833-533-9333 and Press 1 for health information and leave a voicemail to receive a call back."
     },
     "children":[
        
     ]
  }
]

when the results aren’t available yet, and:

[
   {
      "id":"9ccb8479-4eae-4177-a3fb-267358ddb910",
      "classes":null,
      "type":"Heading",
      "data":{
         "text":"COVID-19 (Coronavirus) Test Result",
         "size":2
      },
      "children":[
         
      ]
   },
   {
      "id":"12c25d77-c03b-4582-8f40-be82e1b0ec09",
      "classes":null,
      "type":"KeyValueTable",
      "data":{
         "keyValuePairs":{
            "Health Card Number Ending In":"XXXX",
            "Test Date":"XXXX-XX-XX",
            "Test Result":"NEGATIVE (A negative result means that you did not have COVID-19 when you were tested.)"
         }
      },
      "children":[
         
      ]
   }
]

when a negative test result comes back (positive results aren’t delivered through the online system: I presume they’re communicated with a phone call).

My Node-RED flow simply grabbed the ”No Results Found” or “COVID-19 (Coronavirus) Test Result” and emailed that to me every 30 minutes.

Which is how I got this email at 7:00 a.m. this morning:

Screen shot of the email I got telling me Oliver didn't have COVID-19.

Whew!

The 811 nurse phoned back yesterday at 4:30 p.m., four hours after I first called, and three hours after Oliver had already been tested.

If you want a simple way of checking your own results, and you have access to a machine with cURL (like any Mac with the Terminal app), a stripped down version of the cURL command will get you what you need:

curl 'https://wdf.princeedwardisland.ca/workflow' -H 'Content-Type: application/json' --data-raw '{"featureName":"CovidNegativeResults","metaVars":{"service_id":null,"save_location":null},"queryVars":{"phn":"XXXXXXXX","card_expiry_month":"XXX","card_expiry_year":"YYYY","birth_date":"YYYY-MM-DD","test_date":"YYYY-MM-DD","wdf_prevent_query_string":"true","sid":null,"page_num":"1","page_count":"1","finished":"0"}}'

where:

  • phn is you Provincial Health Card number
  • card_expiry_month is the month your health card expires, as a three-letter month abbreviation (JAN, FEB, etc.)
  • card_expired_year is the four digit year your health card expires.
  • birth_date is your birth date, YYYY-MM-DD
  • test_date is the date you had the test, YYYY-MM-DD

(All you’re doing when you do this is acting a web browser of a different sort; it’s a completely legitimate way of obtaining your results and you’re not doing anything nefarious, as you only have access to your results this way).

Needless to say, both Oliver and I are relieved that he doesn’t have COVID. He’s still got his traditional fall cold, but that, relative to the alternative, is manageable.

Comments

vbj's picture
vbj on September 30, 2020 - 13:16 Permalink

Glad he is OK for his big birthday.